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

Турниры > IMPC16 Group Contests > задача:


23. 50875 - Take m-out

IMPC16 Group Contests

Старт: 16.янв.2016 в 10:00:00
Финиш: 16.янв.2016 в 14:00:00
Турнир завершён!
• Турнирная таблица

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

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

• 03. 50834 - The train which leaves ...
• 11. 50859 - Low performance
• 12. 50860 - Number of Student Certi...
• 13. 50861 - The largest Student Group
• 14. 50862 - Sum of the Pairs
• 15. 50863 - Total Access Cost of a BST
• 21. 50873 - Max Frequency
• 22. 50874 - Apartment Building Adm...
• 23. 50875 - Take m-out
• 24. 50876 - He is my cousin
• 25. 50877 - Friendly Queue
• 32. 50926 - School Mail Merge
• 33. 50927 - Health Expenses
• 34. 50928 - War Of Battleships
• 35. 50929 - Present from your uncles
• F1. 50841 - My grand-grand-grandfa...
• F2. 50936 - Saving the Soldiers

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

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

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

Take m-out

When calculating averages, sometimes m-extremes are discarded in the average calculation. For example in a contest, if a jury member gives extreme grades (compared to the other jury members), his grades will not be used in calculation.

Question: Write a program that reads k grades for n students. Then, the program calculates the averages by discarding m-max-grades and m-min-grades. Show the top 5 winners in the end.

Input specification
You will be first given three numbers:

  • the number of competitors (n): an integer between 5 and 2,000
  • the number of grades (k): where k is between 3 and 50 and each grade is between 0 and 1000
  • the number of extremes to discard (m) where 0 ≤ m < (k/2)
Then in the following n lines, you will be given information for n competitors. Each line starts with name and surname followed by k grades.

Output specification:
Show the names of top 5 competitors descending order according to their average grades.

Sample Input I
7 5 1
Ahmet Haxhiaj 44 38 67 99 61
Enes Hoxhalli 73 78 50 46 66
Hilda Cole 53 48 30 41 98
Florence Haliti 40 95 32 75 54
Rigelta Cami 81 77 32 56 72
Shkelzen Rrapi 79 62 55 59 50
Kimet Avdolli 64 85 99 64 47
Sample Output I
Kimet Avdolli
Rigelta Cami
Enes Hoxhalli
Shkelzen Rrapi
Ahmet Haxhiaj

Explanation: There are 7 competitors with 5 marks given. When calculating the averages, the smallest 1 grade and the max 1 grade are discarded. So, the average of middle 3 grades are calculated. The table below shows the average of top 5:

Name SurnameAverage
Kimet Avdolli71
Rigelta Cami68.33
Enes Hoxhalli63
Shkelzen Rrapi58.67
Ahmet Haxhiaj57.33



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

www.contester.ru