Solutions are presented as using the least memory and the fastest execution time. It also takes the top
10 most recent solutions from each language. If you want to limit to a specific index, click the
"Solved" button and go to that problem.
Problems
B"Mr. Chanek lives in a city represented as a plane. He wants to build an amusement park in the shape of a circle of radius r . The circle must touch the origin (point (0, 0) ). There are n bird habitats that can be a photo spot for the tourists in the park. The i -th bird habitat is at point p_i = (x_i, y_i) . Find the minimum radius r of a park with at least k bird habitats inside. A point is considered to be inside the park if and only if the distance between p_i and the center of the park is less than or equal to the radius of the park. Note that the center and the radius of the park do not need to be integers. In this problem, it is guaranteed that the given input always has a solution with r <= q 2 cdot 10^5 . The first line contains two integers n and k ( 1 <= q n <= q 10^5 , 1 <= q k <= q n ) -- the number of bird habitats in the city and the number of bird habitats required to be inside the park. The i -th of the next n lines contains two integers x_i and y_i ( 0 <= q |x_i|, |y_i| <= q 10^5 ) -- the position of the i -th bird habitat. Output a single real number r denoting the minimum radius of a park with at least k bird habitats inside. It is guaranteed that the given input always has a solution with r <= q 2 cdot 10^5 . Your answer is considered correct if its absolute or relative error does not exceed 10^{-4} . Formally, let your answer be a , and the jury's answer be b . Your answer is accepted if and only if frac{|a - b|}{ max{(1, |b|)}} <= 10^{-4} . In the first example, Mr. Chanek can put the center of the park at (-3, -1) with radius sqrt{10} approx 3.162 . It can be proven this is the minimum r . The following illustrates the first example. The blue points represent bird habitats and the red circle represents the amusement park. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
130611600 |
ruban |
B |
Oct. 3, 2021, 3:38 a.m. |
OK |
Delphi |
TESTS |
34 |
2885 |
166707200 |
|
|
130595832 |
cookiedoth rqi Egor.Lifar |
B |
Oct. 2, 2021, 7:41 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
1435 |
18841600 |
|
|
130615814 |
Alan233 |
B |
Oct. 3, 2021, 5:12 a.m. |
OK |
GNU C++14 |
TESTS |
34 |
1591 |
13312000 |
|
|
130584250 |
chenjb shb123 FrostStar |
B |
Oct. 2, 2021, 4:47 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
1918 |
11161600 |
|
|
130581256 |
Dart-Xeyter shart23 sevlll |
B |
Oct. 2, 2021, 4:09 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
2355 |
30617600 |
|
|
130573956 |
nwi |
B |
Oct. 2, 2021, 2:49 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
3385 |
31744000 |
|
|
130595858 |
serotonin |
B |
Oct. 2, 2021, 7:41 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
4165 |
23347200 |
|
|
130574319 |
waynetseng0105 spentplaying |
B |
Oct. 2, 2021, 2:53 p.m. |
OK |
GNU C++14 |
TESTS |
34 |
4914 |
21401600 |
|
|
130586840 |
maspy |
B |
Oct. 2, 2021, 5:22 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
1231 |
13414400 |
|
|
130596527 |
tamajitbuba |
B |
Oct. 2, 2021, 7:56 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
1497 |
12492800 |
|
|
130582458 |
abhinavvv306 Dragnoid99 mohanraghug |
B |
Oct. 2, 2021, 4:23 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
1918 |
18022400 |
|
|
130592993 |
jaehyunp312 |
B |
Oct. 2, 2021, 6:48 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
1965 |
19558400 |
|
|
130572753 |
jamesbang |
B |
Oct. 2, 2021, 2:37 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
2058 |
17408000 |
|
|
130586647 |
misty1999 tko919 naniwazu |
B |
Oct. 2, 2021, 5:19 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
2339 |
20070400 |
|
|
130586425 |
tamp_ Yousef_Salama |
B |
Oct. 2, 2021, 5:16 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
2714 |
17408000 |
|
|
130589416 |
rheallyc cxaphoenix |
B |
Oct. 2, 2021, 5:58 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
2901 |
14643200 |
|
|
130592485 |
PCTprobability |
B |
Oct. 2, 2021, 6:39 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
3026 |
16691200 |
|
|
130592745 |
hir35 |
B |
Oct. 2, 2021, 6:44 p.m. |
OK |
GNU C++17 |
TESTS |
34 |
3198 |
13414400 |
|
|
130574310 |
heno239 |
B |
Oct. 2, 2021, 2:53 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
935 |
14131200 |
|
|
130583164 |
Nots0fast |
B |
Oct. 2, 2021, 4:32 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
1060 |
32256000 |
|
|
130600526 |
Vectors_Master |
B |
Oct. 2, 2021, 9:22 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
1153 |
25395200 |
|
|
130567445 |
Retired_MiFaFaOvO TLE Miracle03 |
B |
Oct. 2, 2021, 1:47 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
1185 |
14233600 |
|
|
130574262 |
dendi239 Barichek Valera_Grinenko |
B |
Oct. 2, 2021, 2:52 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
1357 |
14540800 |
|
|
130579359 |
Heltion |
B |
Oct. 2, 2021, 3:47 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
1388 |
18841600 |
|
|
130579691 |
SSerxhs fr200110217102 |
B |
Oct. 2, 2021, 3:50 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
1465 |
17920000 |
|
|
130575658 |
.I. -is-this-fft- |
B |
Oct. 2, 2021, 3:06 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
1872 |
18841600 |
|
|
130571628 |
DreamingLeaf JooDdae edenooo |
B |
Oct. 2, 2021, 2:26 p.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
1996 |
21299200 |
|
|
130615231 |
Lain |
B |
Oct. 3, 2021, 5 a.m. |
OK |
GNU C++17 (64) |
TESTS |
34 |
2074 |
14131200 |
|
|
130586607 |
Xinull Liswiera Anastasia_Yun |
B |
Oct. 2, 2021, 5:19 p.m. |
OK |
.NET Core C# |
TESTS |
34 |
1824 |
40960000 |
|
|
130594528 |
sansen |
B |
Oct. 2, 2021, 7:15 p.m. |
OK |
Rust |
TESTS |
34 |
3915 |
32768000 |
|
|
130582839 |
sansen |
B |
Oct. 2, 2021, 4:28 p.m. |
OK |
Rust |
TESTS |
34 |
4976 |
32665600 |
|
|
remove filters
Back to search problems