Rosetta Problems
← atcoder に戻る
Shelving Books on a Bookshelf
https://atcoder.jp/contests/awc0020/tasks/awc0020_e