Rosetta Problems

Efficient Quests

https://atcoder.jp/contests/awc0006/tasks/awc0006_b