| 比赛 | 20120413 | 评测结果 | AAAWWWWAWAWWAAW |
|---|---|---|---|
| 题目名称 | 干草堆 | 最终得分 | 46 |
| 用户昵称 | 201101 | 运行时间 | 0.000 s |
| 代码语言 | C++ | 内存使用 | 0.00 MiB |
| 提交时间 | 2012-04-13 20:14:47 | ||
/*
UID:cheepok
PID:tower
LANG:C++
*/
#include<stdio.h>
int n,tmp,Max,ans,a[100001];
int main()
{
freopen("tower.in","r",stdin);
freopen("tower.out","w",stdout);
int i;scanf("%d",&n);
for(i=1;i<=n;i++)scanf("%d",&a[i]);
for(i=n;i>0;i--){tmp+=a[i];
if(tmp>=Max){Max=tmp;tmp=0;ans++;}}
printf("%d\n",ans);
return 0;
}