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

Сборники > Kovrov IT > задача:


s

Задачи сборника

• 50563 - Modul i gjate
• 50565 - Numra binare
• 50569 - Lendet me zgjedhje per kla...
• 50594 - Transformimet
• 51182 - Count and Sum 2
• 51193 - The max element of k-th co...
• 51196 - The sum of two arrays
• 51197 - Even and odd Numbers
• s
• s
• 010. 50381 - Sum of the numbers
• 125. 50538 - Sum of kth Diagonal
• 140. 50599 - Shuma e katroreve te ...
• 15-SprPrE1-80. 50741 - DNA Distance
• 155. 50334 - What is the class aver...
• 185. 50784 - Top Growing Company
• 220. 50754 - Team Standings

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

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

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

Number of Cities

You are having a national contest, and many students are coming from different cities. For advertising the event in the media, organization committee asks the cities lists with the number of participants from every city.

Question: You are given the cities list for n participants. Write a program to prepare the participating cities list with the number of participants from each.

Input specification
You will be given an integer (n) the number of participants where 1 ≤ n ≤ 10,000. Then in the following n lines you will be given n strings where each city name is at most 15 chars long containing only 26 English chars.

Output specification
Show the cities list with the number of participants from each.

Sample Input  
7
Elbasan
Durres
Tirana
Elbasan
Shkoder
Elbasan
Tirana
Sample Output  
Elbasan 3
Durres 1
Tirana 2
Shkoder 1

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

www.contester.ru