4326: Non-negative Partial Sums
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:0
Description
题面翻译
题意经 :
给你一个长度为n的序列 ,队首元素可放到队尾,问有多少种情况使得每种序列的每项前缀和都大于等于 ?
Input
输入包含多组数据,当 为 时输入结束。每组测试点第一行为 ,第二行为长度为 的序列
Output
输出包括 行,每行为每组测试点的
Sample Input Copy
3
2 2 1
3
-1 1 1
1
-1
0
Sample Output Copy
3
2
0