|
||||||||||
Cut the ropeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 822 Accepted Submission(s): 390 Problem Description Now we have some ropes. For each rope, you can cut it only once at any place, or you can also do nothing on it. If we cut these ropes optimally, how many ropes we can get at most with the same length? Input There is an integer T (1 <= T <= 100) in the first line, indicates there are T test cases in total. For each test case, the first integer N (1 <= N <= 100000) indicates there are N ropes. And then there are N integers whose value are all in [1, 100000], indicate the lengths of these ropes. Output For each test case, you should output one integer in one line, indicates that the number of ropes we can get at most with the same length if we cut these ropes optimally. Sample Input
Sample Output
Hint For Sample 1, we can get two ropes with 0.5 unit length. For Sample 2, we can get three ropes with 1 unit length. For Sample 3, we can get five ropes with 1.5 unit length. Source | ||||||||||
|