UVA933 Water Flow

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=874 [PDF](https://uva.onlinejudge.org/external/9/p933.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA933/83315a7463b1f344d3a233802991a145c15d155c.png)

Input Format

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

Output Format

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