PROJECT EULER · #0724
Drone Delivery
A depot uses
Initially all drones are stationary, loaded with a supply package.
Every second, the depot selects a drone at random and sends it this instruction:
- If you are stationary, start moving at one centimetre per second along the road.
- If you are moving, increase your speed by one centimetre per second along the road without changing direction.
The road is wide enough that drones can overtake one another without risk of collision.
Eventually, there will only be one drone left at the depot waiting to receive its first instruction. As soon as that drone has flown one centimetre along the road, all drones drop their packages and return to the depot.
Let
For example,
Find
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.