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"You are given an integer k and n distinct points with integer coordinates on the Euclidean plane, the i -th point has coordinates (x_i, y_i) . Consider a list of all the frac{n(n - 1)}{2} pairs of points ((x_i, y_i), (x_j, y_j)) ( 1 <= i < j <= n ). For every such pair, write out the distance from the line through these two points to the origin (0, 0) . Your goal is to calculate the k -th smallest number among these distances. The first line contains two integers n , k ( 2 <= n <= 10^5 , 1 <= k <= frac{n(n - 1)}{2} ). The i -th of the next n lines contains two integers x_i and y_i ( -10^4 <= x_i, y_i <= 10^4 ) -- the coordinates of the i -th point. It is guaranteed that all given points are pairwise distinct. You should output one number -- the k -th smallest distance from the origin. Your answer is considered correct if its absolute or relative error does not exceed 10^{-6} . 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^{-6} . There are 6 pairs of points: "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
98501084 |
duality |
F |
Nov. 15, 2020, 7:03 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
4742 |
10035200 |
|
|
98497114 |
littlelittlehorse |
F |
Nov. 15, 2020, 6:01 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
7050 |
141414400 |
|
|
98495208 |
littlelittlehorse |
F |
Nov. 15, 2020, 5:41 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
7269 |
141414400 |
|
|
98495243 |
littlelittlehorse |
F |
Nov. 15, 2020, 5:41 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
7300 |
141414400 |
|
|
98495274 |
littlelittlehorse |
F |
Nov. 15, 2020, 5:42 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
7331 |
141414400 |
|
|
98497076 |
littlelittlehorse |
F |
Nov. 15, 2020, 6 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
7363 |
141414400 |
|
|
98497026 |
littlelittlehorse |
F |
Nov. 15, 2020, 5:59 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
7378 |
141414400 |
|
|
98497043 |
littlelittlehorse |
F |
Nov. 15, 2020, 6 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
7410 |
141414400 |
|
|
98495166 |
littlelittlehorse |
F |
Nov. 15, 2020, 5:41 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
7425 |
141414400 |
|
|
98494884 |
littlelittlehorse |
F |
Nov. 15, 2020, 5:39 p.m. |
OK |
GNU C++11 |
TESTS |
41 |
7487 |
141414400 |
|
|
98492674 |
stevenkplus |
F |
Nov. 15, 2020, 5:02 p.m. |
OK |
GNU C++14 |
TESTS |
41 |
3852 |
9216000 |
|
|
98498663 |
sh1194 |
F |
Nov. 15, 2020, 6:22 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
1825 |
7680000 |
|
|
98476210 |
ainta |
F |
Nov. 15, 2020, 3:52 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
1887 |
7680000 |
|
|
98500090 |
Benq |
F |
Nov. 15, 2020, 6:44 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
2090 |
14336000 |
|
|
98504348 |
kefaa2 |
F |
Nov. 15, 2020, 8:10 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
2745 |
10035200 |
|
|
98502497 |
kefaa2 |
F |
Nov. 15, 2020, 7:29 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
3322 |
12492800 |
|
|
98490163 |
Sooke |
F |
Nov. 15, 2020, 4:50 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
3603 |
22425600 |
|
|
98482100 |
jtnydv25 |
F |
Nov. 15, 2020, 4:15 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
3790 |
18944000 |
|
|
98481827 |
Errichto |
F |
Nov. 15, 2020, 4:14 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
5178 |
12697600 |
|
|
98499569 |
Eva |
F |
Nov. 15, 2020, 6:36 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
5194 |
11059200 |
|
|
98493379 |
kefaa2 |
F |
Nov. 15, 2020, 5:04 p.m. |
OK |
GNU C++17 |
TESTS |
41 |
5474 |
12492800 |
|
|
98497077 |
yosupo |
F |
Nov. 15, 2020, 6 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
1996 |
9523200 |
|
|
98489678 |
maroonrk |
F |
Nov. 15, 2020, 4:48 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
2433 |
11878400 |
|
|
98470414 |
ecnerwala |
F |
Nov. 15, 2020, 3:34 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
2558 |
7680000 |
|
|
98482236 |
Um_nik |
F |
Nov. 15, 2020, 4:15 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
2620 |
11468800 |
|
|
98506923 |
Monogon |
F |
Nov. 15, 2020, 9:27 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
3790 |
16076800 |
|
|
98498008 |
LJC00118 |
F |
Nov. 15, 2020, 6:13 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
3899 |
23244800 |
|
|
98509243 |
amethyst0 |
F |
Nov. 15, 2020, 10:53 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
4258 |
16076800 |
|
|
98484136 |
ksun48 |
F |
Nov. 15, 2020, 4:23 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
4726 |
15257600 |
|
|
98495532 |
egor_bb |
F |
Nov. 15, 2020, 5:44 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
5085 |
15052800 |
|
|
98484171 |
ko_osaga |
F |
Nov. 15, 2020, 4:23 p.m. |
OK |
GNU C++17 (64) |
TESTS |
41 |
5194 |
26009600 |
|
|
98520466 |
cwise |
F |
Nov. 16, 2020, 5:27 a.m. |
OK |
Java 8 |
TESTS |
41 |
4211 |
7065600 |
|
|
98519651 |
cwise |
F |
Nov. 16, 2020, 5:09 a.m. |
OK |
Java 8 |
TESTS |
41 |
4258 |
6246400 |
|
|
remove filters
Back to search problems