Rosetta Problems

2nd Greatest Distance

https://atcoder.jp/contests/arc121/tasks/arc121_a