Rosetta Problems

Orchard Harvest

https://atcoder.jp/contests/awc0008/tasks/awc0008_d