Rosetta Problems

Canal: Water Going Up and Down

https://onlinejudge.u-aizu.ac.jp/problems/2202