Sobes.tech
Middle+ — Principal

Efficient Delivery Route Planner

livecode

Task condition

Develop an algorithm that receives M points, each described by coordinates and a required arrival time, and calculates the order of visiting them that minimizes the total travel time and the number of delays.

Input:

  • M — the number of points;
  • For each point: coordinates (x, y) and the time by which it must be reached.

Output:

  • A sequence of points that ensures the minimal total travel time and the minimal number of delays.

Constraints:

  • 1 ≤ M ≤ 10^5;
  • Coordinates and times are integers.

Note: This problem belongs to the class of route optimization problems (a variant of the Traveling Salesman Problem with time windows).