Start: Jul, 03, 2019 08:38:00
2019年度暑期短学期第七天 助教场
End: Jul, 04, 2019 23:00:00
Time elapsed:
Time remaining:

Problem_ID: B
Result: Accepted
Time: 145ms
Memory: 1892kB
Author: 2017212212083
In contest: 1292

#include<bits/stdc++.h>

using namespace std;

int n;
map<string, int> mp;
string tmp;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    int T;
    cin >> T;
    while (T--) {
        mp.clear();
        cin >> n;
        for (int i = 0; i < n; ++i) {
            cin >> tmp;
            mp[tmp]++;
        }
        int res = 0;
        for (auto it : mp) {
            res = max(res, it.second);
        }
        cout << res << endl;
    }
}