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: 481ms
Memory: 9572kB
Author: 2018212212317
In contest: 1292


#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<map>
using namespace std;
const int maxn = 1000010;
const int inf = 0x3f3f3f3f;
const int mod = 1e9+7;
int n,m,k,t,ans,maxx;
int x,y,z;
int a[maxn],b[maxn];
map<string,int>mp;
string s;
int main(){
	cin>>t;
	for(int j=0;j<t;j++){
		mp.clear();
		maxx=0;
		cin>>n;
		for(int i=0;i<n;i++){
			cin>>s;
			mp[s]++;
			maxx=max(maxx,mp[s]);
		}
		cout<<maxx<<endl;
	}
}