Rosetta Problems

箱と鍵 (Boxes and Keys)

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/1567