<pre name="code" class="cpp">#include<iostream>
#include<map>
using namespace std;
#define maxn 810
int N,M;
char ss[30];
map<int,int>t;
int main()
{
cin>>M>>N;
int maxx=0;
t[maxx]=0;
int temp;
for(int i=1;i<=N;i++)
{
for(int j=1;j<=M;j++)
{
scanf("%d", &temp);
t[temp]++;
if(t[temp]>t[maxx])
{
maxx=temp;
}
}
}
cout<<maxx<<endl;
return 0;
}PAT 1054
最新推荐文章于 2021-03-10 19:28:47 发布

330

被折叠的 条评论
为什么被折叠?



