Rosetta Problems

展覧会 3 (Exhibition 3)

https://atcoder.jp/contests/joisp2025/tasks/joisp2025_a