hdu 5123 who is the best?
来源:互联网 发布:淘宝男装卖家推荐尺码 编辑:程序博客网 时间:2024/06/04 18:50
找出出现频率最高的数.
#include<iostream>using namespace std;int a[100+5];int main(){int t;cin>>t;while(t--){memset(a,0,sizeof(a));int n;cin>>n;while(n--){int x;cin>>x;a[x]++;}int i,sum=0,re=0;for(i=1;i<100+5;i++){if(a[i]>sum){re=i;sum=a[i];}}cout<<re<<endl;}return 0;}
0 0
- hdu 5123 who is the best?
- hdu 5123 who is the best?
- HDU—— 5123 who is the best?
- hdu 5123 who is the best?(Bestcoder Round #20)
- BC who is the best?(HDU 5123)
- HDU 5123 who is the best? hash统计
- hdu 5123 who is the best?(水)
- hdu 5123 who is the best?(数组处理)
- 杭电5123 who is the best?
- HDU5123 who is the best?
- 【CUGBACM15级BC第20场 A】hdu 5123 who is the best?
- H电-Problem Archive-5123-who is the best?
- Who do you think is the best coder and why?
- Who do you think is the best coder, and why?”
- Who do you think is the best coder, and why?
- zz"Who do you think is the best coder, and why?"zz
- who is the real hero!
- Who is the Smartest Man
- [UBOOT] AM335x nand init/nand command trace(u-boot-2011.09)
- AsyncTask 异步任务
- storm0.9.1安装
- 完美适应键盘高度变化
- JSP学习------新建servlet注意问题
- hdu 5123 who is the best?
- iOS开发技巧-iphone手机截屏到电脑桌面上
- 深入理解Java Web访问路径问题
- iOS快速开发框架Bee-Framework应用和解析(三) --- Message, Model, Signal
- OpenCV:使用Kalman滤波器跟踪一个旋转的点
- 图像处理中的一阶偏导和二阶偏导
- GitHub 优秀的 Android 开源项目
- [sfs2x]SmartFoxServer 2X 的安装
- HDU 5172 GTY's gay friends (线段树)