Maybe you know the traveller salesman problem and how to solve it... If it is your case you are lucky, because to obtain points in this problem we only ask you for giving us a solution of a concrete problem of the traveller salesman. You will receive more or less points depending on your solution. Do not send your code: you only have to send the (best) solution that you find.
By the way: we have checked that the graph that you have to solve is big enough to not trying to solve it by hand.
The input is formed by a line with the number of vertices of the graph, followed by lines that contain the list of the vertices. Each one of these lines are formed by 3 numbers separated by spaces: an integer number with the number of the vertex (from to ), and two real number with the coordinates and of the vertex. The vertices appear in the list in increasing order by number.
The output must consist of an only line with numbers from to , separated by spaces, none of them repeated. The numbers of the line describe the path that you propose to the traveller salesman that, leaving from the first vertex of the list, visits the other ones in the specified order and goes back to the origin.
Remember that you do not have to deliver the program, but a file with the best solution that you have found to the proposed traveller salesman problem. Your solution will be marked depending on its quality (length of the path that the traveller salesman must go round, independently of the method or the time that you have lasted to find it. When you deliver the solution, do not forget to mark that it is written in the programming language “TSP Problem”, unless that you want to receive compilation errors.
(10 points) The distance of your solution is less than .
(10 points) The distance of your solution is less than .
(10 points) The distance of your solution is less than .
(10 points) The distance of your solution is less than .
(10 points) The distance of your solution is less than .
(10 points) The distance of your solution is less than .
(10 points) The distance of your solution is less than .
(10 points) The distance of your solution is less than .
(10 points) The distance of your solution is less than .
(10 points) The distance of your solution is less than .
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T18:11:37.923Z
© Jutge.org, 2006–2026.
https://jutge.org