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

Турниры > CEN109/111_2016_Questions > задача:


HW1. 51055 - The competition

CEN109/111_2016_Questions

Старт: 07.дек.2016 в 12:37:00
Финиш: 07.дек.2016 в 13:42:00
Турнир завершён!
• Турнирная таблица

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

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

• HW1. 51055 - The competition
• HW2. 51056 - Welcome Picnic
• PE01. 51027 - Download Percentage
• PE02. 51028 - Isosceles Triangles
• PE03. 51029 - Buy Three Items
• PE04. 51030 - Number of Right Tria...
• PE05. 51031 - Convert from Hex to...
• PE06. 51032 - Triangle Property
• PE07. 51033 - Sum of the series

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

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

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

Q2

The Sensitive Society Club organizes a donation campaign. To put more fun in the campaign, they organize a competition among departments. In the competition top donating students and the department are awarded with a certificate.

Question: Write a program that reads the information for n students then it shows

  • the name of the student who donated the most amount
  • and the department whose average is the highest

Input specification: You will be given one integer (n) in the beginning. Then, the following n lines will have three information:

  • Student name: names are at most 20 char strings containing only 26 English (uppercase or lowercase) letters
  • his/her department: at most 4 chars long string (only 3 departments in the competition: CEN, ECE or BINF)
  • The amount donated: a positive integer not greater than 20,000
where n is between 1 and 10,000.

Output specification: Show two strings:

  • the name of the student who donated the most,
  • The department whose average is the highest.
Note: If there are two students with the same value, show the first one.

Sample Input
6
Alban CEN 15
Redi ECE 7
Erda CEN 4
Kei BINF 9
Ardi BINF 11
Arli ECE 12

Sample Output
Alban BINF



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

www.contester.ru