HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > IMPC-2014-15 Questions > problem:


Ind_01-10. 50752 - Student Groups

IMPC-2014-15 Questions

Start: Nov.22.2014 at 03:00:00 PM
Finish: Nov.22.2014 at 08:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 3rd-3. 50474 - Sum of Two Primes
• 3rd-4. 50406 - Draw Pattern 178
• 3rd-5. 50415 - The Scientist
• 3rd-6. 50695 - Longest link between...
• 4th-1. 50491 - Brokers
• 4th-2. 50524 - Elevator
• 4th-3. 50535 - Image Compression
• 4th-6. 50536 - Epoka Furgon Shpk
• Ind_01-10. 50752 - Student Gro...
• Ind_01-20. 50416 - Placing Domino...
• Ind_01-30. 50764 - Fast Typing Co...
• Ind_01-50. 50718 - Elevator
• Ind_02-10. 50497 - Falling Bricks - ...
• Ind_02-20. 50745 - Bitonic Sequence
• Ind_02-30. 50657 - Permutations an...
• Ind_03-10. 50743 - Total Scholarshi...
• Ind_03-20. 50515 - Lines - Revisited

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

Student Groups

For a contest, organization committee wants to form k equal level groups. For this, they are putting the students in descending order according to the points they have collected. And then, first student goes to the first group and the second student goes to the second group, ... and kth student is placed to the kth group. Then (k+1)th student is again placed into the first group, and so on.

Question: Write a program that is going to read student information. Then, your program will print the people in mth group.

Input specification
You will be given three integers in the first line:

  • the number students (n)
  • the number of groups (k)
  • the group to be printed (m)
where 0 ≤ n ≤ 2000, 1 ≤ k ≤ 20 and 1 ≤ m ≤ k. Then, in the following n lines you will be given name and average of n people. A student is before the other, if he has higher points than the other. If two students have the same points collected, the student whose name alphabetically smaller comes the first. Student points are integers between 1 and 10,000.

Output specification
Show the names of the people in group m.

Sample Input I
6 3 2
Endri 7
Andi 4
Albi 5
Genti 6
Evis 6
Denis 8
Sample Output I
Endri
Albi

Explanation:
There are three goups.

  • The first group will have Denis Genti.
  • The second group will have Endri Albi.
  • The third group will have Evis Andi.


Для отправки решений необходимо выполнить вход.

www.contester.ru