Rosetta Problems

長距離バス (Long Distance Coach)

https://atcoder.jp/contests/joisc2017/tasks/joisc2017_g