Rosetta Problems

スタンプラリー 2 (Collecting Stamps 2)

https://atcoder.jp/contests/joi2016ho/tasks/joi2016ho_b