USACO 2019 January Contest Gold Problem 3 Shortcut
Every evening, Farmer John rings a giant bell that summons his cows to the barn for dinner. Eager to get to the barn?as?quickly?as?possible, they all follow the shortest possible route to get there...