ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Kovrov IT > задача:


50752 - Student Groups

Гость
• Вопросы к жюри (1)

Задачи сборника

• 50525 - Ordering Pizza
• 50342 - 100 Factorial
• 50524 - Elevator
• 50531 - File Decryption
• 50758 - National Elections - Revisited
• 50687 - Pascal Triangle - 2
• 50756 - Average of the Nth Student
• 50457 - The Number of Winners
• 50752 - Student Groups
• 50451 - Processing Cost
• 50751 - The biggest Minute
• 50468 - Draw Matrix - 2
• 50470 - Close Pairs - Revised
• 50998 - CEN112 Homework, quiz av...
• 50804 - Marathon
• 50835 - Club Presidency
• 50526 - Gold Market

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
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