← 返回 meta 的题目列表Calculate Minimum Distance with Drones
类型:online_judge
Given a target distance and a list of stations, calculate the minimum distance walked carrying cargo. At each station, a drone can be used to deliver cargo, and the drone can fly up to 10 units. Steps: From the current position, walk carrying cargo to the nearest station, then use the drone to deliver cargo. If the drone does not reach the target, walk empty-handed to pick up the cargo. Repeat until reaching the target.
Example
Input
20
2 5 8 15