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

Разделы > Поиск > задача:


50483 - Group Total

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

Задачи раздела

• 50862 - Sum of the Pairs
• 51059 - Football teams
• 51058 - Third grade students
• 51060 - Public Transportation
• 50861 - The largest Student Group
• 50815 - Breaking the Bunker
• 50483 - Group Total
• 51078 - Max trade
• 50500 - Find Student
• 50786 - Top Question
• 50788 - Eight Puzzle
• 50504 - School contest
• 51056 - Welcome Picnic
• 50787 - Expected Value
• 51055 - The competition

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

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

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

Group Total

South-West Primary school is having a problem solving competition. The contest is among the students of four classes and every student solves questions given in the book. The class with the most number of questions solved will be the winner.

Question: Input specification
Write a program that is going to read the information for n students and find the winning class.

Input specification:
You will be given the number of students (n) which is followed by 4 class names in the first line. n is an integer between 1 and 1000 Each of the following n lines contain one student information:

  1. Student Name: Not longer than 15 characters and containing only uppercase or lowercase English letter.
  2. Class: Every class name consists of 3 to 5 characters. They are composed of digits and uppercase English letters.
  3. Number of questions solved: An integer between 0 and 250

Output specification
Show the winning class with the total number of questions solved by the students of this class.

 Sample Input I     Sample Output I   
8 08A 08B 08C 08D
Candace 08B 5
Viola 08A 8
Sidney 08D 2
Nicholas 08C 8
Holly 08A 5
Bryant 08B 5
Hugo 08D 5
Kristina 08C 10

08C 18


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

www.contester.ru