F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Geometry Problem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)
Total Submission(s): 11889    Accepted Submission(s): 1810
Special Judge


Problem Description
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$.
 

Input
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.
 

Output
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$.
 

Sample Input
1 7 1 1 1 0 1 -1 0 1 -1 1 0 -1 -1 0
 

Sample Output
0 0 1
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 00:13:37, Gzip enabled