Rosetta Problems

Apple Harvest

https://atcoder.jp/contests/awc0009/tasks/awc0009_c