Rosetta Problems

Irrigation Sprinkler

https://atcoder.jp/contests/awc0138/tasks/awc0138_b