Rosetta Problems

巻物 (Scroll)

https://atcoder.jp/contests/joig2021-open/tasks/joig2021_b