文章
93
粉丝
56
获赞
264
访问
21.5k
#include <bits/stdc++.h>
using namespace std;
int main()
{
map<int,int,greater<int>> mp;
int n;
cin>>n;
for(int i=0;i<n;i++)
{
int a;
cin>>a;
mp[a]++;
}
int maxx=0;
for(auto it=mp.begin();it!=mp.end();it++)
{
if(it->second>maxx)maxx=it->second;
}
int i=0;
for(auto it=mp.begin();it!=mp.end();it++)
{
if(it->second==maxx)i=it->first;
}
cout<<i;
return 0;
}
登录后发布评论
暂无评论,来抢沙发