Rosetta Problems

Watering the Flower Bed

https://atcoder.jp/contests/awc0054/tasks/awc0054_c