#include <iostream>
#include <cstring>
#include <algorithm>
#include <unordered_map>
using namespace std;
int main()
{
int n;
cin >> n;
unordered_map<string, int> cnt;
while (n -- )
{
string line;
cin >> line;
cnt[line] ++ ;
}
int res = 0;
for (auto& [k, v]: cnt) res = max(res, v);
cout << res << endl;
return 0;
}
作者:yxc
链接:https://www.acwing.com/activity/content/code/content/1686560/
来源:AcWing
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。