Rosetta Problems

たのしいたのしいたのしい家庭菜園 (Growing Vegetables is Fun 3)

https://atcoder.jp/contests/joi2019ho/tasks/joi2019ho_c