TSP

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.

Input

The input is formed by a line with the number of vertices n of the
graph, followed by n 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 1 to n), and two real
number with the coordinates x and y of the vertex. The vertices appear
in the list in increasing order by number.

Output

The output must consist of an only line with n numbers from 1 to n,
separated by spaces, none of them repeated. The n 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.

Hint

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.

Score

- (10 points) The distance of your solution is less than 710000.

- (10 points) The distance of your solution is less than 705000.

- (10 points) The distance of your solution is less than 700000.

- (10 points) The distance of your solution is less than 695000.

- (10 points) The distance of your solution is less than 690000.

- (10 points) The distance of your solution is less than 685000.

- (10 points) The distance of your solution is less than 680000.

- (10 points) The distance of your solution is less than 675000.

- (10 points) The distance of your solution is less than 670000.

- (10 points) The distance of your solution is less than 665000.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T18:11:37.923Z

© Jutge.org, 2006–2026.
https://jutge.org
