| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12508 | The Horse Racing |
|
| 12509 | I, THIEF |
|
| 12511 | Pointer Sorting |
|
Description
Tian-Ji is a horse racing master. However, you still don't want to lose. That is, you should find best strategy to maximum your win rate.
Both of you have many horses, and all of them have a combat point. The faster horse owns bigger combat point, also guarantee it will win if it has bigger combat point.
Try hard to beat Tian-Ji, the master of horse racing!!
Input
N
S_1
S_2
0<N<=50, 0<combat point <=100.
N is the number of horses racing.
S_1 is yourS horse combat point sequence.
S_2 is Tian-Ji's horse combat point sequence.
Output
N
The number of win case.
No need to change line.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
You are a thief, a thief try hard to steal money along street as much as you can.
However, if you steal two adjacent house is very easy to alert the police, a situation you should avoid.
HINT: If you get TLE, you can try to save the subproblem answer. Then next time, if you want to use it, no need to repeat same work.
Input
N
S_i
N is the number of house. 0<N<=100
S_i is representing the amount of money of each house, money amount is no more than 10000
Output
M
M is the maximum amount of money you can rob tonight without alerting the police.
make sure there is a trailing space followed by it.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
You will need to write a function to solve sorting problem.
ptr is a pointer, len is the length of ptr and is a complete square number, after we allocate it space according by the input.
After sorting ptr in non-descending order, you need to put it in a 2D array in row-major order, then return it in int** type.
Input
you don't need to worry it
Output
A 2D matrix
Remember to change line each row.