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

Турниры > CEN303 2013-15 Questions > задача:


13-Fall2-40. 50753 - Average of the Nth Student

CEN303 2013-15 Questions

Старт: 15.дек.2013 в 14:00:00
Финиш: 15.дек.2013 в 19:00:00
Турнир завершён!
• Турнирная таблица

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

Задачи турнира

• 50472 - Minimum Sum Triangle
• 50842 - Minimum Sum Triangle - DP
• 50319 - Toll Plazas
• 51000 - Book Index
• 50531 - File Decryption
• 50464 - From Tirana to Durres
• 13-Fall2-10. 50411 - Sum of the Lea...
• 13-Fall2-20. 50687 - Pascal Triangle - 2
• 13-Fall2-40. 50753 - Average of...
• 13-Fall2-50. 50686 - The Container
• 14-Fall1-10. 50740 - Service Time - 1
• 14-Fall1-20. 50750 - Service Time - 2
• 14-Fall1-30. 50771 - BST Level Sum
• 14-Fall1-40. 50683 - Te Parkojme A...
• 14-Fall1-50. 50770 - Average Depth
• 14-Fall1-60. 50784 - Top Growing C...
• 14-Fall2-10. 50751 - The biggest Mi...

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

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

Лимит времени 4500/4500/4500/4500 мс. Лимит памяти 110000/110000/110000/110000 Кб.
Question by Ibrahim Mesecan.

Average of the Nth Student

Chinese Minister of Education is having a visit to your country. He has heard that you have a nice program for schools. And now, he is asking you to prepare something for their their universtiy entrance exams.

Question:
Write a program that reads n students information (name, surname and an integer grade). Then,using count sort, your program will sort students according to the averages in descending order. And, it will show all students within the range from a to b.

Input specification
The first line of the input contains three integers (n, a and b) where n denotes the number of students and a nd b denotes the positions in the sorted list where 0 ≤ a < b ≤ n ≤ 200000 (two hundred thousand). Each of the following n lines will have semicolon separated information:

  • Name and Surname: At most 36 chars string containing only English letters and space ending with a semicolon.
  • Grade: an integer number between 0 and 10000

Output specification
Show all students from a to b with their names and grades.
Note:

  • Please pay attention that there are two million names thus, to avoid time limit, you can use count sort.
  • Positions start from 0.

Sample Input I   
  10 1 4
  Sherri Booker Haag; 5307
  Branda Dell Large; 5976
  Savannah Cecilia Mena; 5423
  Glory Adam Newman; 9648
  Sam Larson; 6079
  Virgil Emmy Rico; 7221
  Alexandra Cayla Frierson; 8307
  Laraine Azucena Cook; 8426
  Dalila Caroll Campbell; 7738
  Margie Bowman; 8426
Sample Output I   
  Margie Bowman; 8426
  Laraine Azucena Cook; 8426
  Alexandra Cayla Frierson; 8307
  Dalila Caroll Campbell; 7738


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

www.contester.ru