1848 - I2P(I)2019_Hu_lab8 Scoreboard

Time

2019/11/25 18:40:00 2019/11/25 20:40:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12511 Pointer Sorting
12525 I, THIEF, Circle

12511 - Pointer Sorting   

Description

You will need to write a function to solve sorting problem.

int** s(int* ptr,int len);

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.c

Partial Judge Header

12511.h

Tags




Discuss




12525 - I, THIEF, Circle   

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.

Sample Input  Download

Sample Output  Download

Tags




Discuss