Euclidean traveling salesman over single dimension? nc travelling-salesman.hsctf.com 1337
You are handing out newspapers to classrooms in HSN. There is a list of classrooms given to you that you
have to visit. These classrooms are conveniently located in a single hallway, which has 100 classrooms
numbered 1 .. 100 in order. Since you are lazy, you want to minimize your walking distance. Given that you
must start and end at classroom 1 , output the order of classes to visit in order to minimize your walking
distance. If there are multiple solutions, output any.
There will be 3 test cases.
For each test case, you will be given an array of integers representing the classrooms to visit. You will then be
prompted to enter a list of space separated integers representing the order in which the classrooms will be
visited.
[59, 68, 24, 83]
order: 59 83 68 24
[27, 29, 43, 50, 78, 21, 70, 89, 93, 85]
order: 27 29 43 50 78 21 70 89 93 85
Distance too large
Action | Rating | Author team |
---|---|---|
Read writeup |
not rated
|
pcmsCTF |
Read writeup |
not rated
|
Pwn17 |