Til the Cows Come Home
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 31748
Accepted: 10757
Description
Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get back as quickly as possible.
Farmer John's field has N (2 <= N <= 1000) landmarks in it, uniquely numbered 1..N. Landmark 1 is the barn; the apple tree gro......
阅读全文