[ABC231B] 选举(Election)
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
一场选举正在进行。个人参与了投票。第 人投票给了名为的候 选人。找出获得最多选票的候选人的名字。
给定的输入保证有唯一一个得票最多的候选人。
输入格式
第一行输入一个整数 。
接下来有 行,每行输入一个字符串 ,表示候选人的姓名。
输出格式
输出获得最多选票的候选人的名字。。
样例
5
snuke
snuke
takahashi
takahashi
takahashi
takahashi
5
takahashi
takahashi
aoki
takahashi
snuke
takahashi
1
a
a
提示
样例说明 1
takahashi得到了 票,snuke得到了 票,所以我们打印 takahashi。。
数据范围
- 是一个长度在 到 之间(包括 和 )的由小写英文字母组成的字符串
- 是整数
- 输入保证有唯一一个得票最多的候选人