Rosetta Problems

島巡り (Island Hopping)

https://atcoder.jp/contests/joisp2024/tasks/joisp2024_k