Rosetta Problems

Circular Necklace

https://atcoder.jp/contests/awc0121/tasks/awc0121_c