回复 10楼 寒风中的细雨
程序代码:
# ./closest_pair 输入点的数量:4 一行一个点 例如:4,5 其中4为x轴坐标 5为y轴坐标 0.5,1 3,0.5 1,3 2.5,1.5 (3.000000, 0.500000)<->(2.500000, 1.500000) dis[1.118034] ----------------- 网上 找到的一个输入例子 # ./closest_pair 输入点的数量:40 一行一个点 例如:4,5 其中4为x轴坐标 5为y轴坐标 24.11,33.1 11.33,15.66 24.18,5.42 33.95,43.44 98.19,4.31 17.06,96.67 91.65,43.67 23.62,11.38 51.54,4.45 82.93,55.06 28.46,48.33 93.33,17.01 3.84,47 93.94,21.12 20.07,92.17 7.92,33.13 53.34,18.44 3.92,4.22 14.99,50.57 1.58,31.62 4.13,60.96 55.23,33.77 6.44,5.84 81.8,22.3 80.61,9.14 22.43,94.26 99.5,67.04 46.68,84.16 92.07,54.53 86.19,48.15 53.22,73.18 26.2,41.52 1.4,15.14 20.51,97.44 40.44,84.3 53.73,21.76 71.55,3.4 14.62,50.11 16.45,60.28 16.92,24.16 (14.620000, 50.110000)<->(14.990000, 50.570000) dis[0.590339] ---------------------