Bob duck he want alice nest duck duck ultimate animal image courtesy see Bang the journey represent straight line consist n segment Bob locate leave segment Alices nest right segment each segment length meter terrain type grass water lava Bob movement type swimming walk fly he switch change direction point time locate noninteger coordinate do not require extra time Bob swim water walk grass fly terrain flying meter take 1 second swimming meter take 3 second finally walk meter take 5 secondsBob finite energy call stamina Swimming walk relax gain 1 stamina meter walk swim on hand fly tiring spend 1 stamina meter fly stay place influence stamina of course stamina negative Initially stamina zerowhat short possible time reach Alices nest