Rosetta Problems

最後の戦い (The Last Battle)

https://atcoder.jp/contests/joigsp2023/tasks/joigsp2023_h