Rosetta Problems

Keys and Treasure Boxes

https://atcoder.jp/contests/awc0002/tasks/awc0002_d