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

Турниры > Epoka Science Olympiad 2013-2015 > задача:


2014-10Gr-30. 50418 - Student averages

Epoka Science Olympiad 2013-2015

Старт: 18.мая.2013 в 10:00:00
Финиш: 18.мая.2013 в 15:00:00
Турнир завершён!
• Турнирная таблица

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

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

• 2013-10Gr-20. 50311 - Student Line Up
• 2013-10Gr-40. 50313 - Pattern Disp...
• 2013-11Gr-10. 50314 - Falling Distance
• 2013-11Gr-20. 50315 - Pig Latin
• 2013-11Gr-30. 50316 - Population B...
• 2013-11Gr-40. 50317 - Student Line Up
• 2014-10Gr-10. 50424 - Area
• 2014-10Gr-20. 50417 - Fun Fair
• 2014-10Gr-30. 50418 - Student ...
• 2014-10Gr-40. 50429 - Secret Message
• 2014-11Gr-10. 50430 - ATM
• 2014-11Gr-20. 50420 - Teachers Si...
• 2014-11Gr-30. 50431 - Sultan's Game
• 2015-09Gr-10. 50344 - Profit or Loss
• 2015-09Gr-20. 50725 - Fibonacci Se...
• 2015-09Gr-30. 50302 - Paper Sciss...
• 2015-09Gr-40. 50303 - Pattern

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

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

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

Student averages

Question:
Your math professor keeps student grades in a file. Time to time, he wants to see student lists sorted according to averages. Write a program that reads student names surnames and 3 marks for every student. Then, your program will show top m students sorted in descending order according to the averages.

Input specification
The first line of the input contains two integers (n and m) where n denotes the number of students and m denotes the number of top students to show in the output where 1 ≤ (m , n) ≤ 600.
Each of the following n lines will have:

  • Name: At most 15 chars string containing only English letters.
  • Surname: At most 15 chars string containing only English letters.
  • 3 Marks: 3 integer numbers between 0 and 100

Output specification
Show top m students' names surnames and averages.

 Sample Input I     Sample Input II   
 3 1
 BESMIR HOXHA 80 80 80
 ARDIT DULI 70 70 70
 ERJONA ISUFI 90 90 90
 5 3
 EDENA METI 72 84 96
 BESNIK BEU 70 80 70
 MARIO ALIJA 50 50 50
 ANDI BAJRAMI 85 80 95
 DAJANA HOXHA 95 96 98
 Sample Output I     Sample Output II   
 ERJONA ISUFI 90
 DAJANA HOXHA 96.3333
 ANDI BAJRAMI 86.6667
 EDENA METI 84


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

www.contester.ru