Rosetta Problems

車の乗り継ぎ

https://atcoder.jp/contests/gigacode-2019/tasks/gigacode_2019_e