Rosetta Problems

貨物列車 (Freight Train)

https://atcoder.jp/contests/joi2023yo2/tasks/joi2023_yo2_d