Rosetta Problems

鉄道旅行 (Railway Trip)

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/656