HDU 1029 Ignatius and the Princess IV 【求众数】
来源:互联网 发布:ubuntu启动anaconda 编辑:程序博客网 时间:2024/06/06 03:50
看题目觉得还挺奇怪的,后来反应过来其实是求一堆数字的众数。。。。
最近做题真是越来越懒了。。。= = 有木有人可以监督我唉
#include <stdio.h>#include <string.h>int main(){int n, num[50000], tem, i, j;while(scanf("%d",&n) != EOF){memset(num, 0, sizeof(num));for(i = 1; i <= n; i++){scanf("%d",&tem);num[tem]++;if(num[tem] >= (n + 1) / 2)j = tem;}printf("%d\n",j);}return 0;}
- HDU 1029 Ignatius and the Princess IV 【求众数】
- hdu 1029 Ignatius and the Princess IV
- HDU 1029 Ignatius and the Princess IV
- HDU 1029 Ignatius and the Princess IV
- HDU 1029 Ignatius and the Princess IV
- hdu 1029 Ignatius and the Princess IV
- hdu 1029 Ignatius and the Princess IV
- hdu 1029 Ignatius and the Princess IV
- hdu 1029 Ignatius and the Princess IV
- Ignatius and the Princess IV hdu 1029
- hdu 1029 Ignatius and the Princess IV
- HDU 1029 Ignatius and the Princess IV
- HDU 1029 Ignatius and the Princess IV
- hdu 1029 Ignatius and the Princess IV
- hdu 1029 Ignatius and the Princess IV
- HDU 1029 Ignatius and the Princess IV
- HDU-1029-Ignatius and the Princess IV
- HDU--1029--Ignatius and the Princess IV
- BB10 点对点的向另一个NFC设备发NDEF消息
- Android主线程里不允许网络操作
- Android手机软件研发环境配置
- 【Cocos2d-x lua篇004】获取Lua表结构数据
- UITabBarController+UINavigationController多层嵌套
- HDU 1029 Ignatius and the Princess IV 【求众数】
- 【Cocos2d-x lua篇005】C++调用Lua的函数
- 在Ubuntu下怎么截图
- Linux系统调用
- 【Cocos2d-x lua篇006】Lua调用C++的函数
- UIWebView加载Loading...两种方法
- 把内容写入指定目录指定文件的java文件工具类,支持日期格式目录名的生成
- UIView详解
- EOJ 1255