Rosetta Problems

エンブレム(Emblem)

https://atcoder.jp/contests/tkppc2/tasks/tkppc2016_d