#include <iostream>
#include <map>
#include <string>
using namespace std;
map < string, int > ma;
map < string, int > :: const_iterator it;
int n;
string s;
int main ( ) {
while ( cin >> n && n ) {
ma.clear ( );
int Max = 0;
for ( int i = 0; i < n; ++i ) {
cin >> s;
++ma[s];
if ( ma[s] > Max ) Max = ma[s];
}
for ( it = ma.begin ( ); it != ma.end ( ); ++it )
if ( it -> second == Max ) cout << it -> first << endl;
}
}
hdu 1004 (map)
最新推荐文章于 2021-06-24 22:53:24 发布