题意:求最多有多少行相同
#include<stdio.h>
#include<string.h>
#include<string>
#include<iostream>
#include<map>
#include<algorithm>
using namespace std;
map<string,int>q;
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
q.clear();
string s;
int Max=0;
for(int i=0;i<n;i++)
{
cin>>s;
q[s]++;
Max=max(Max,q[s]);
}
cout<<Max<<endl;
}
}