HDU 1029 Ignatius and the Princess IV
来源:互联网 发布:centos安装switchdesk 编辑:程序博客网 时间:2024/06/07 19:11
题目:点击打开链接
代码:
#include<stdio.h>#include<string.h>#include<algorithm>#include<math.h>using namespace std;int a[1000000];int b[1000000];int main(){ int n; while(~scanf("%d",&n)) { memset(b,0,sizeof(b)); for(int i=0;i<n;i++) { scanf("%d",&a[i]); b[a[i]]++; } for(int i=0;i<n;i++) { if(b[a[i]]>=(n+1)/2) {printf("%d\n",a[i]);break;} } }}
0 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
- 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
- hdu - 1029 -Ignatius and the Princess IV
- cf#AIM Tech Round -B. Making a String-贪心/set
- maven+springMVC+mybatis+junit详细搭建过程
- 我会的东西
- 基本算法——第九单元 递推
- NativeActivity的胶水层android_native_app_glue详解和使用
- HDU 1029 Ignatius and the Princess IV
- VS2013下socket新函数代替旧函数引起的编译错误
- redis设置为系统服务并开机启动(附脚本文件)
- [Excel 与 股票] 一图胜千言之 Excel 处理股票数据
- openWrt从源码下载到编译(开发环境搭建)
- Android studio获取数字签名
- [LeetCode]74. Search a 2D Matrix
- 文章标题
- Java设计模式学习之 —— 单例(Singleton)