CF1641F.Covering Circle
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Sam started playing with round buckets in the sandbox, while also scattering pebbles. His mom decided to buy him a new bucket, so she needs to solve the following task.
You are given n distinct points with integer coordinates A1,A2,…,An . All points were generated from the square [−108,108]×[−108,108] uniformly and independently.
You are given positive integers k , l , such that k≤l≤n . You want to select a subsegment Ai,Ai+1,…,Ai+l−1 of the points array (for some 1≤i≤n+1−l ), and some circle on the plane, containing ≥k points of the selected subsegment (inside or on the border).
What is the smallest possible radius of that circle?
输入格式
Each test contains multiple test cases. The first line contains a single integer t ( 1≤t≤104 ) — the number of test cases. Descriptions of test cases follow.
The first line of each test case contains three integers n , l , k ( 2≤k≤l≤n≤50000 , k≤20 ).
Each of the next n lines contains two integers xi , yi ( −108≤xi,yi≤108 ) — the coordinates of the point Ai . It is guaranteed that all points are distinct and were generated independently from uniform distribution on [−108,108]×[−108,108] .
It is guaranteed that the sum of n for all test cases does not exceed 50000 .
In the first test, points were not generated from the uniform distribution on [−108,108]×[−108,108] for simplicity. It is the only such test and your solution must pass it.
Hacks are disabled in this problem.
输出格式
For each test case print a single real number — the answer to the problem.
Your answer will be considered correct if its absolute or relative error does not exceed 10−9 . Formally let your answer be a , jury answer be b . Your answer will be considered correct if max(1,∣b∣)∣a−b∣≤10−9 .
输入输出样例
输入#1
4 3 2 2 0 0 0 4 3 0 5 4 3 1 1 0 0 2 2 0 2 2 0 8 3 2 0 3 1 0 0 2 1 1 0 1 1 2 0 0 1 3 5 4 4 1 1 -3 3 2 2 5 3 5 5
输出#1
2.00000000000000000000 1.00000000000000000000 0.50000000000000000000 4.00000000000000000000
说明/提示
In the first test case, we can select subsegment A1,A2 and a circle with center (0,2) and radius 2 .
In the second test case, we can select subsegment A1,A2,A3,A4 and a circle with center (1,2) and radius 1 .