<PREV Problem:
NEXT>
Solved by 299 users: ...
UserDateAttemptTimeCMSC
army21 aug 2009C++400.60202 
TheVice03 mar 2007Kylix602.69214 
Tulegenov_Amir17 mar 2007Kylix1902.87214 
Quazar09 may 2010FPC102.59215 
olesheg05 jan 2011FPC202.60215 
Zaurbek_I13 mar 2007FPC1202.63215 
Zaurbek_I13 mar 2007FPC1302.63215 
Ivan_KBTU05 dec 2009C++203.54215 
TheVice13 mar 2007Kylix802.54216 
Zaurbek_I28 feb 2007Kylix1102.55216 
Tulegenov_Amir11 mar 2007Kylix1702.10218 
Tulegenov_Amir11 mar 2007Kylix1802.10218 
nt_d228 oct 2006FPC2600.20221 
D.S10 mar 2004FPC3?.??222 
SerikBeketayev16 mar 2007Kylix1302.50223 
Languages
C++
171
FPC
87
Kylix
21
C
18
Java
9
Python
1
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 
 > 

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 210ms

SW soft NIX
ID = 3.235.30.155