当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6242:Geometry Problem

Special Judge 特殊评判
题目描述
Alice is interesting in computation geometry problem recently. She found a interesting problem and solved it easily. Now she will give this problem to you :

You are given $N$ distinct points $(X_i,Y_i)$ on the two-dimensional plane. Your task is to find a point $P$ and a real number $R$, such that for at least $\lceil \frac{N}{2} \rceil$ given points, their distance to point $P$ is equal to $R$.
输入解释
The first line is the number of test cases.

For each test case, the first line contains one positive number $N(1 \leq N \leq 10^5)$.

The following $N$ lines describe the points. Each line contains two real numbers $X_i$ and $Y_i$ $(0 \leq |X_i|, |Y_i| \leq 10^3)$ indicating one give point. It's guaranteed that $N$ points are distinct.
输出解释
For each test case, output a single line with three real numbers $X_P, Y_P, R$, where $(X_P,Y_P)$ is the coordinate of required point $P$. Three real numbers you output should satisfy $0 \leq |X_P|, |Y_P|, R \leq 10^9$.

It is guaranteed that there exists at least one solution satisfying all conditions. And if there are different solutions, print any one of them. The judge will regard two point's distance as $R$ if it is within an absolute error of $10^{-3}$ of $R$.
输入样例
1
7
1 1
1 0
1 -1
0 1
-1 1
0 -1
-1 0
输出样例
0 0 1
来自杭电HDUOJ的附加信息
Recommend jiangzijing2015

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6242

最后修改于 2020-10-25T23:29:37+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 262144/262144K(Java/Others)