Rosetta Problems

ふたつの交通機関 (Two Transportations)

https://atcoder.jp/contests/joisc2019/tasks/joisc2019_f