Rosetta Problems

本棚 (Bookshelf)

https://atcoder.jp/contests/joisc2011/tasks/joisc2011_bookshelf