HDOJ1029 Ignatius and his princess IV
来源:互联网 发布:淘宝情侣装店铺名称 编辑:程序博客网 时间:2024/06/12 00:12
水题。。类似桶排的思路- -
#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int maxn=500000;int a[maxn];int main(){ int n; while(scanf("%d",&n)!=EOF) { memset(a,0,sizeof(a)); int id=-1; for(int i=0;i<n;i++) { int t; scanf("%d",&t); a[t]++; if(a[t]>=(n+1)/2) id=t; } printf("%d\n",id); } return 0;}
0 0
- HDOJ1029 Ignatius and his princess IV
- HDOJ1029 Ignatius and the Princess IV
- hdoj1029 Ignatius and the Princess IV(对题目的观察?)
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- Ignatius and the Princess IV
- 和小白一起学ABAP – 17 SAP程序设计之 应用事务开发
- HDOJ1028 Ignatius and the Princess III
- xsd文件的定义
- 《Programming in Lua 3》读书笔记(八)
- altium designer 常用元件封装
- HDOJ1029 Ignatius and his princess IV
- [工具推荐] mupdf
- 第二十周自由练习项目——acm 对象转换
- 无废话MVC入门教程一[概述、环境安装、创建项目]
- 学习javacv之二:javacv0.8开发环境的搭建
- 用引用返回值(转)
- Hibernate基础知识点总结
- 错误"因为数据库正在使用,所以无法获得对数据库的独占访问权"的解决方案
- IOS开发之----通讯录访问授权