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

Турниры > CEN112 Homeworks 2013-2015 > задача:


15-SprPr2-80. 50786 - Top Question

CEN112 Homeworks 2013-2015

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

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

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

• 14-Spr2-50. 50616 - Змейка
• 14-Spr2-60. 50444 - n digit kth nu...
• 15-SprHW-20. 50446 - Snake
• 15-SprHW-30. 50788 - Eight Puzzle
• 15-SprHW-40. 50746 - Most Visited
• 15-SprHW-60. 50516 - Lines
• 15-SprPr2-20. 50509 - Reading Book
• 15-SprPr2-60. 50766 - Word Puzzle
• 15-SprPr2-80. 50786 - Top Ques...
• 15-SprPrE1-20. 50785 - Swimming ...
• 15-SprPrE1-40. 50748 - Gold Store
• 15-SprPrE1-70. 50507 - Sequential ...
• 15-SprResit-20. 50447 - Swimming ...

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

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

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

Top Question

Your friend works as a teacher in a school and he organizes multiple choice exams throughout the school and he needs your support for his multiple choice exams. He records student answers in a file and he wants to see the top solved question

Question: Write a program that reads n exams for n students and it prints the top solved question.

Input specification
At the beginning, you will be given two numbers (n and m). Next line contains m space separated letters which are the correct answers of the exam. The following n lines contain the answers of n students. The student answers can be a letter from A to Z where 1 ≤ n ≤ 1,000 and 1 ≤ m ≤ 100.

Output specification
Show the number of the top solved question. Note: Show the first occurrence, if there are several questions with the same result.

Sample Input I
3 5
C E D E C
C E D B A
B E D E C
C E D E C
Sample Output I
2

Explanation: All students answered second and third questions correctly. So, the first top solved question is the second question.

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

www.contester.ru