当前位置:网站首页>CCF-201312-1
CCF-201312-1
2022-07-27 16:29:00 【Eschatological light】

#include<iostream>
#include<algorithm>
#include<map>
/* The sample input
6
10 1 10 20 30 20
*/
using namespace std;
int main(){
map<int,int> maps;
int n;cin>>n;// Given n A positive integer , Number of self input
int number[1000];// Definition 1000 The size of an array
for(int i=0; i<n; i++){
cin>>number[i];
} // Manually enter the given n Number ;
sort(number,number+n);
for(int i=0; i<n; i++){
maps[number[i]]++;
} // take map For recording
int max = maps[number[0]];
int id = 0;
for(int i = 0; i<n; i++){// Find the maximum number of occurrences
if(maps[number[i]] > max){
max = maps[number[i]];
id = i;
}
}
cout << number[id];
int k;
cin>>k;
return 0;
}
边栏推荐
猜你喜欢

: 0xc0000005: an access conflict occurs when writing position 0x01458000 - to be solved

Mapreduce实例(三):数据去重

Notes on implementation and acquisition of flowable custom attributes

Pychart import existing project

DRF learning notes (I): Data Serialization

C channel simply implements the publishing and subscription of message queue

Leetcode234 question - simple method to judge palindrome linked list

DRF learning notes (IV): DRF view

CCF-201312-1

Web test learning notes 01
随机推荐
Firefox old version
Coturn service installation in webrtc
Enable shallow and deep copies+
减小PDF文档大小(转载)
profileapi. h header
COMS Technology
C language programming (Third Edition)
Coding skills - Global exception capture & unified return body & Business exception
插入word中的图片保持高dpi方法
4位数的随机数据
重新配置cubemx后,生成的代码用IAR打开不成功
Flume incrementally collects MySQL data to Kafka
: 0xc0000005: an access conflict occurs when writing position 0x01458000 - to be solved
MapReduce instance (III): data De duplication
Reduce PDF document size (Reprint)
Nacos
JMeter5.3 及以后的版本jmeter函数助手生成的字符在置灰无法复制
C语言逆序输出字符串
google chrome revercecaptcha广告屏蔽
Characters generated by JMeter function assistant in jmeter5.3 and later versions cannot be copied when they are grayed out