HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50752 - Student Groups

Guest
• Review clarifications (1)

Volume problems

• 50669 - Area of an Irregular Polygon
• 50860 - Number of Student Certificates
• 50444 - n digit kth number divisible...
• 50865 - Apartment Building Adminis...
• 50531 - File Decryption
• 50525 - Ordering Pizza
• 50451 - Processing Cost
• 50470 - Close Pairs - Revised
• 50752 - Student Groups
• 50524 - Elevator
• 50751 - The biggest Minute
• 50468 - Draw Matrix - 2
• 50998 - CEN112 Homework, quiz av...
• 50804 - Marathon
• 50835 - Club Presidency
• 50526 - Gold Market
• 50872 - Top M Grades

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