<PREV Problem:
NEXT>
Solved by 293 users: ...
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 

Best segmentation

Time limit = 4 seconds

You are given even number of points on a plain. You should write prigram witch splits them into pares. Each pare forms a segment.

And you should minimize total length of all segments.

Output the minimal total length of segments with 3-digits accuracy.

Input total number of points N, 2 ≤ N ≤ 20
coord-X coord-Y
coord-X coord-Y
...
All coordinates are real numbers from the interval (-100000 , 100000).

Output One line with minimal total length.

Input#1
4
0.0 0.0
0.0 1.0
2.0 0.0
2.0 1.0
Output#1
2.0

Author:
Voroztsov Artem
4 october 2003

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 200ms

SW soft NIX
ID = 23.20.13.165