Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: The
k-th Largest Group
Description Newman likes playing with cats. He possesses lots of cats in his home. Because the number of cats is really huge, Newman wants to group some of the cats. To do that, he first offers a number to each of the cat (1, 2, 3, …, Input 1st line: Two numbers 2nd to ( Output For every operation “1” in the input, output one number per line, specifying the size of the kth largest group. Sample Input 10 10 0 1 2 1 4 0 3 4 1 2 0 5 6 1 1 0 7 8 1 1 0 9 10 1 1 Sample Output 1 2 2 2 2 Hint When there are three numbers 2 and 2 and 1, the 2nd largest number is 2 and the 3rd largest number is 1. Source POJ Monthly--2006.08.27, zcgzcgzcg |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator