P3076 [USACO13FEB] Taxi G
题目描述
Bessie is running a taxi service for the other cows on the farm. The cows have been gathering at different locations along a fence of length M (1
输入格式
无
输出格式
无
说明/提示
There are two cows waiting to be transported along a fence of length 10. The first cow wants to go from position 0 (where Bessie starts) to position 9. The second cow wishes to go from position 6 to position 5.
Bessie picks up the first cow at position 0 and drives to position 6. There she drops off the first cow, delivers the second cow to her destination and returns to pick up the first cow. She drops off the first cow and then drives the remainder of the way to the right side of the fence.