Rosetta Problems

道路の建設案 (Road Construction)

https://atcoder.jp/contests/joisc2021/tasks/joisc2021_e