Rosetta Problems

Apple Harvest

https://atcoder.jp/contests/awc0058/tasks/awc0058_b