Rosetta Problems

JJOOII (JJOOII)

https://atcoder.jp/contests/joi2012ho/tasks/joi2012ho1