ZOJ 3932Handshakes(翻译水题)
来源:互联网 发布:中华小说网源码 编辑:程序博客网 时间:2024/06/05 06:11
题目:http://acm.hust.edu.cn/vjudge/problem/visitOriginUrl.action?id=359792
代码:
#include<stdio.h>#include<string.h>using namespace std;int main(){ int t; scanf("%d",&t); while(t--) { int n; scanf("%d",&n); int a[100005]; int ans=0; for(int i=0;i<n;i++) { scanf("%d",&a[i]); } int maxn=0; for(int i=1;i<n;i++) { if(a[i]>maxn) maxn=a[i]; else if(a[i]>0) maxn++; } printf("%d\n",maxn); }}
0 0
- ZOJ 3932Handshakes(翻译水题)
- zoj--3932--Handshakes(水题)
- ZOJ - 3932 Handshakes (技巧)握手
- ZOJ 3932 Handshakes
- ZOJ 3932 Handshakes
- ZOJ 3932——Handshakes
- Handshakes
- CodeForces 534D-B - Handshakes-模拟水题
- URAL 1194. Handshakes (乱搞)
- Codeforces 534D - Handshakes(构造,暴力)
- Codeforces Round #298 (Div. 2) D. Handshakes(贪心)
- Codeforces534D:Handshakes
- CFD. Handshakes
- codeforces #298 D. Handshakes
- 【CodeForces 534D】Handshakes
- zoj水题分类(自己练习)
- zoj水题分类
- zoj 水题习题集
- ZOJ 3927Programming Ability Test(水题)
- CSS 定位
- Oracle存储过程基本语法
- LaTex 随记
- Windows远程桌面到Ubuntu
- ZOJ 3932Handshakes(翻译水题)
- Android 实现复制到系统剪贴板 TextView 实现单行输入,禁止换行,多出来的显示省略号
- java 枚举enum的本来源码
- 第十周项目1 点-圆-圆柱的继承设计
- POJ 1995 多项式求和取模
- 文章标题
- Go 性能优化技巧 2/10
- 正则表达式学习笔记
- ExtJS -- 改变树节点图标 tree