HDU 2717 Catch That Cow(BFS) Catch That Cow
Catch That CowFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is