文件名称:x
介绍说明--下载内容来自于网络,使用问题请自行百度
★问题描述:
给出平面上的N 个二维点,求出距离最小的2 个点对。本题中距离定义为他们的直
线距离。例如(0,0) (3,4)的距离为5.
★数据输入:
有多组数据,对于每组数据,第一行是一个数字N 表示点的个数。N=0 的时候说明
输入结束。之后N 行,每行有2 个浮点数x_i,y_i 表示第i 个点的坐标。(1<=N<=10000
0,0<=|x_i|,|y_i|<=10^9)
★结果输出:
输出一个浮点数,表示最近点对的距离除以2,保留2 位小数(四舍五入)。-★ Problem Descr iption:
Gives the N-dimensional point in the plane, find the minimum distance two points right. The problem is defined as the distance of their straight
Line distance. E.g., (0,0) (3,4) distance is 5.
★ Data input:
Multiple sets of data, for each set of data, the first line is a number N represents the number of points. Descr iption when N = 0
Enter the ending. After N lines, each line has two floating-point numbers x_i, y_i represents the i-th coordinate point. (1 <= N <= 10000
0,0 <= | x_i |, | y_i | <= 10 ^ 9)
★ resulting output:
Output a float that is the nearest point on the distance divided by 2, to retain two decimal places (rounded).
给出平面上的N 个二维点,求出距离最小的2 个点对。本题中距离定义为他们的直
线距离。例如(0,0) (3,4)的距离为5.
★数据输入:
有多组数据,对于每组数据,第一行是一个数字N 表示点的个数。N=0 的时候说明
输入结束。之后N 行,每行有2 个浮点数x_i,y_i 表示第i 个点的坐标。(1<=N<=10000
0,0<=|x_i|,|y_i|<=10^9)
★结果输出:
输出一个浮点数,表示最近点对的距离除以2,保留2 位小数(四舍五入)。-★ Problem Descr iption:
Gives the N-dimensional point in the plane, find the minimum distance two points right. The problem is defined as the distance of their straight
Line distance. E.g., (0,0) (3,4) distance is 5.
★ Data input:
Multiple sets of data, for each set of data, the first line is a number N represents the number of points. Descr iption when N = 0
Enter the ending. After N lines, each line has two floating-point numbers x_i, y_i represents the i-th coordinate point. (1 <= N <= 10000
0,0 <= | x_i |, | y_i | <= 10 ^ 9)
★ resulting output:
Output a float that is the nearest point on the distance divided by 2, to retain two decimal places (rounded).
(系统自动生成,下载前可以参看下载内容)
下载文件列表
x.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.