HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > "Informatics Stars" Online Contests - 2011-2014 > problem:


2014-04-50. 50569 - 12th Grade Elective Subjects

"Informatics Stars" Online Contests - 2011-2014

Start: Oct.20.2012 at 10:00:00 AM
Finish: Oct.20.2012 at 03:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 2012-12-30. 50684 - Sum of prime ...
• 2013-01-10. 50584 - Total invoice ...
• 2013-01-30. 50599 - Sum of Squar...
• 2013-03-20. 50578 - Mersenne prime
• 2013-03-30. 50360 - National Elections
• 2013-03-40. 50705 - Student Clubs
• 2014-04-10. 50547 - Close Pair
• 2014-04-30. 50560 - Max Distance
• 2014-04-50. 50569 - 12th Grad...
• 2014-04-50. 50703 - The Shortest Path

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

12th Grade Elective Subjects

Shqip

Question: Maturity exams for 12th grade students are organized by the ministry every year. The students are able to choose 3 subjects out of 20. Write a program that reads 3 choices of n students. And then, the program counts and shows course list with the number of students who has chosen that course.

Input specification
You will be first given the number of students an integer number (n) where 2 ≤ n ≤ 10,000. Then, in the following n lines, you will be given three course names where course names are one word strings containing only uppercase or lowercase English letters (no special characters).

Output specification
Show course list in ascending lexicographic order followed by the number of students taking that exam.

 Sample Input   
 4
 Biology Geography Sociology
 French Geography Psychology
 English History Physics
 French History Sociology
 Sample Output   
 Biology 1
 English 1
 French 2
 Geography 2
 History 2
 Physics 1
 Psychology 1
 Sociology 2


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

www.contester.ru