Rosetta Problems

Sightseeing Plan

https://atcoder.jp/contests/agc018/tasks/agc018_e