hdu 5123 who is the best?(水)
来源:互联网 发布:夏亚大魔数据 编辑:程序博客网 时间:2024/05/17 00:59
题目连接:hdu 5123 who is the best?
#include <cstdio>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const int maxn = 105;int main () {int cas, n, x, c[maxn];scanf("%d", &cas);while (cas--) {scanf("%d", &n);memset(c, 0, sizeof(c));for (int i = 0; i < n; i++) {scanf("%d", &x);c[x]++;}int ans = c[1], idx = 1;for (int i = 2; i <= n; i++) {if (c[i] > ans) {ans = c[i];idx = i;}}printf("%d\n", idx);}return 0;}
0 0
- hdu 5123 who is the best?(水)
- hdu 5123 who is the best?
- hdu 5123 who is the best?
- BC who is the best?(HDU 5123)
- hdu 5123 who is the best?(数组处理)
- HDU—— 5123 who is the best?
- hdu 5123 who is the best?(Bestcoder Round #20)
- HDU 5123 who is the best? hash统计
- 杭电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?
- GYM 100712 A.Who Is The Winner?(水~)
- zz"Who do you think is the best coder, and why?"zz
- who is the real hero!
- Android中滑屏实现----手把手教你如何实现触摸滑屏以及Scroller类详解
- hdu 5053 the Sum of Cube(水)
- 搬家啦
- CodeForces 18C - Stripe
- nyoj 757 期末考试 【STL 优先队列】
- hdu 5123 who is the best?(水)
- [HDU:5316]Magician
- 浅谈Java多线程中的Thread.sleep()和wait()方法的区别
- 黑马程序员--网络编程
- 放下8件事,净化你的心灵
- C++基础---字符型
- linux查看和关闭后台执行程序
- hdu 5124 lines(贪心)
- C++ Pragma 预处理指令