mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-06 01:18:48 +00:00
28 lines
420 B
C++
28 lines
420 B
C++
|
#include <iostream>
|
||
|
#include <map>
|
||
|
#include <string>
|
||
|
|
||
|
using std::cin;
|
||
|
using std::cout;
|
||
|
using std::endl;
|
||
|
|
||
|
int n;
|
||
|
std::string s;
|
||
|
std::map<std::string, int> m;
|
||
|
std::pair<std::string, int> ans;
|
||
|
|
||
|
int main() {
|
||
|
cin >> n;
|
||
|
while (n--) {
|
||
|
cin >> s;
|
||
|
m[s]++;
|
||
|
}
|
||
|
for (auto i : m) {
|
||
|
if (i.second > ans.second) {
|
||
|
ans = i;
|
||
|
}
|
||
|
}
|
||
|
cout << ans.first << endl;
|
||
|
return 0;
|
||
|
}
|