/*vector_change*/
#include <cstdio>
#include <iostream>
#include <map>
using namespace std;
//15-2-5
int main()
{
//freopen("1.txt", "r", stdin);
int n;
map<string, int> m;
string s;
while( cin >> n && n )
{
m.clear();
int max = 0;
for( int i=0; i<n; i++)
{
cin >> s;
m[s]++;
if( m[s] > max ) max = m[s];
}
map<string, int>::iterator it;
for( it=m.begin(); it!=m.end(); it++)
{
if( it->second == max ) cout<<it->first<<endl;
}
}
return 0;
}
HDU1004
最新推荐文章于 2021-06-24 22:53:24 发布