| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12511 | Pointer Sorting |
|
| 12525 | I, THIEF, Circle |
|
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.
Sample Input Download
Sample Output Download
Partial Judge Code
12511.cPartial Judge Header
12511.hTags
Discuss
Description
It's time to steal money again, still, try hard to steal money along street as much as you can and please avoid steal two adjacent houses.
However, target tonight is a little different. All houses at this place are arranged in a circle.
That is, you can't steal money from first and last house simultaneously.
Input
N
S_i
N is the number of house. 2<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.