当前位置:网站首页>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;
}
边栏推荐
- JMeter5.3 及以后的版本jmeter函数助手生成的字符在置灰无法复制
- Introduction and use of redis
- Sudden! 28 Chinese entities including Hikvision / Dahua / Shangtang / Kuangshi / ITU / iFLYTEK have been blacklisted by the United States
- TP5 -- query field contains a certain --find of search criteria_ IN_ SET
- Product axure9 English version, using repeater repeater to realize drop-down multi selection box
- TP5 query empty two cases
- Nacos
- t5 学习
- mysql设置密码时报错 Your password does not satisfy the current policy requirements(修改·mysql密码策略设置简单密码)
- MapReduce instance (I): wordcount
猜你喜欢

DRF use: get request to get data (small example)

2.2 JMeter基本元件

Product axure9 English version, using repeater repeater to realize drop-down multi selection box

Log management

DeFi安全之DEX与AMMs

The whereor method of TP5 has many conditions

Excel extract duplicates

training on multiple GPUs pytorch

字节跳动服务网格基于 Hertz 框架的落地实践

Coturn service installation in webrtc
随机推荐
The 4.3 billion euro cash acquisition of OSRAM failed! AMS said it would continue to acquire
指针总结
嵌入式面试
Leetcode25 question: turn the linked list in a group of K -- detailed explanation of the difficult questions of the linked list
重新配置cubemx后,生成的代码用IAR打开不成功
DeFi安全之DEX与AMMs
Analysis of PHP keyword replacement classes (avoid repeated replacement, keep and restore the original links)
将IAR工程文件夹转移目录后无法进入函数定义解决
Introduction to JWT
How PHP changes a two-dimensional array into a one-dimensional array
JSP Foundation
减小PDF文档大小(转载)
爬取常见英文名
my_ls小结
最大子段和 Go 四种的四种求解
DRF learning notes (III): model class serializer modelserializer
MySQL index
Determine the exact type of data
Const summary
Pointer summary