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: 120ms
Memory: 2940kB
Author: 2018212212127
In contest: 1292

#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<cstdio>
using namespace std;
typedef long long ll;
const int inf=0x3f3f3f3f;
const int maxn=1e3+100;
char a[maxn][maxn];
int main(){
	int t;
	scanf("%d",&t);
	while(t--){
		int n,kk=1;
		scanf("%d",&n);
		getchar();
		for(int i=0;i<n;i++) scanf("%s",a[i]); 
		for(int k=0;k<n;k++){
			int kf=1;
			for(int i=0;i<n;i++) {
				if(k==i) continue;
				if(strcmp(a[k],a[i])==0) kf++;
			}
			kk=max(kf,kk);
		}
		printf("%d\n",kk);
	}
}