文章
5
粉丝
492
获赞
1
访问
36.5k
#include <stdio.h>
#include <limits.h>
#include <map>
using namespace std;
int main()
{
int N, i, temp, count = 0, num = INT_MAX ,cnt;
scanf("%d", &N);
map<int,int> m;
for ( i = 0; i < N; i++)
{
scanf("%d", &temp);
cnt = m[temp] ++;
if (cnt > count)
{
count = m[temp];
num = temp;
}
else if ( cnt == count)
{
 ...
登录后发布评论
暂无评论,来抢沙发