Rosetta Problems

JOI 紋章 (JOI Emblem)

https://atcoder.jp/contests/joi2014ho/tasks/joi2014ho1