Rosetta Problems

Watering the Flower Bed

https://atcoder.jp/contests/awc0123/tasks/awc0123_b