프롬프트 없음
5 6 2 1 2 3 4 5 1 2 5 1 3 3 2 4 3 3 4 5 4 5 2 3 5 7
40
출처: USACO 2019 January Contest, Gold Problem 3. Shortcut