UVA12393 Non-negative Partial Sums

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=278&page=show_problem&problem=3815 [PDF](https://uva.onlinejudge.org/external/123/p12393.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12393/c7d5888823e6871a6ffd50c5dd5622b3d6b919e1.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12393/f7163a7b74d0c390229a4a89f795208bfca1e754.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12393/fee5bd3e1a916b70a0ca00f204723c2647882079.png)