11 URAL1025 Democracy in Danger
来源:互联网 发布:移动网络电视信号不好 编辑:程序博客网 时间:2024/05/18 22:55
选择人数较少的m/2只队,每只队中半数人投票。
#include<cstdio>#include<algorithm>using namespace std;int main(){ int i,n,ans,s[110]; while(~scanf("%d",&n)) { for(i=0;i<n;i++) scanf("%d",&s[i]); sort(s,s+n); ans=0; for(i=0;i<=n/2;i++) ans+=s[i]/2+1; printf("%d\n",ans); } return 0;}
0 0
- 11 URAL1025 Democracy in Danger
- poj2370 Democracy in danger!
- 1025. Democracy in Danger
- URAL 1025. Democracy in danger
- ural 1025 Democracy in Danger
- POJ 2370 Democracy in danger
- POJ 2370 Democracy in Danger
- poj 2370 Democracy in danger
- Overcome ACM POJ 2370 - Democracy in danger
- Ural-1025. Democracy in Danger(水题)
- Timus 1025. Democracy in Danger 题解
- URAL 1025 — Democracy in Danger
- URAL 1025. Democracy in Danger (贪心)
- Ural 1025 Democracy in Danger 解题报告
- URAL 1025 Democracy in Danger 贪心
- (贪心5.2.7)URAL 1025 Democracy in Danger
- A Pilot in Danger!
- POJ 1781 In Danger
- WCF 获取数据对象时,报“基础连接已经关闭: 接收时发生错误”
- Hdoj 1520&Poj2342 Anniversary party 【树形DP】
- 转载一个google面试的准备清单
- C++多线程编程随笔
- windows下相关基准测试工具介绍
- 11 URAL1025 Democracy in Danger
- 【cocos2d-x 3.5】C++物理引擎
- ListView滑动删除 ,仿腾讯QQ
- Android整理:SQlite数据库的使用以及通过listView显示数据
- Myeclipse +eclipse设置+快捷键
- 12 POJ1477 Box of Bricks
- hdu 1087 Super Jumping! Jumping! Jumping!(简单dp)
- Android之SimpleAdapter简单实例和SimpleAdapter参数说明
- MFC学习二