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
Megumin is a wizard who can cast powerful magic spells that affect large areas. She is obsessed with the extremely devastating Explosion spell that can destroy everything around its target. There are currently (n) slimes in the wild. Each slime's location can be described in 2D Cartesian coordinates. Megumin wishes to kill at least (k) slimes so she can earn more experience points to level up her Explosion. To do that, she can choose any circle on the plane and cast an Explosion spell which kills every slime inside or on the border of the circle. However, the Explosion magic requires a large amount of mana to cast, and Megumin can only use it once per day. The amount of mana used is equal to the area inside the circle she chooses. What is the minimum amount of mana she needs to spend to kill (k) slimes with a single Explosion? The first line contains two integers (n) and (k) ((1 \le k \le n \le 10^5)) — the number of slimes and how many slimes Megumin needs to defeat. Each of the next (n) lines contains two integers (x) and (y) ((-10^9 \le x, y \le 10^9)), denoting the coordinates ((x, y)) of a slime's location. It is guaranteed that all locations are distinct and that no three slimes lie on the same circle. Print one real number — the answer. 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|)} \le 10^{-6}). In the first example, Megumin can hit the slime with a circle centered at ((0, 0)) with radius (0). In the second example, Megumin can hit the first and last slimes with a circle centered at ((1, 0)) with radius (1). |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
313513642 |
stupidnessplusplus |
G |
April 1, 2025, 5:22 p.m. |
OK |
C# 10 |
TESTS |
21 |
171 |
7065600 |
|
|
|
313544859 |
PedroGallo |
G |
April 1, 2025, 11:30 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
108 |
102400 |
|
|
|
313552086 |
Luvidi |
G |
April 2, 2025, 2:24 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
109 |
0 |
|
|
|
313505359 |
Geforgs |
G |
April 1, 2025, 4:34 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
109 |
0 |
|
|
|
313503699 |
crazycoder76 |
G |
April 1, 2025, 4:33 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
109 |
0 |
|
|
|
313503466 |
timusmanovs |
G |
April 1, 2025, 4:33 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
109 |
0 |
|
|
|
313534538 |
majedkh |
G |
April 1, 2025, 8:12 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
109 |
102400 |
|
|
|
313499099 |
YTF |
G |
April 1, 2025, 4:29 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
109 |
3276800 |
|
|
|
313554946 |
Gotsuhan |
G |
April 2, 2025, 3:14 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
124 |
0 |
|
|
|
313554868 |
Gotsuhan |
G |
April 2, 2025, 3:13 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
124 |
0 |
|
|
|
313508183 |
kash474 |
G |
April 1, 2025, 4:51 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
21 |
124 |
102400 |
|
|
|
313549566 |
A_G |
G |
April 2, 2025, 1:25 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
78 |
102400 |
|
|
|
313534185 |
dorijanlendvaj |
G |
April 1, 2025, 8:07 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
92 |
102400 |
|
|
|
313542885 |
ihanif |
G |
April 1, 2025, 10:36 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
93 |
0 |
|
|
|
313531077 |
Dell_Know |
G |
April 1, 2025, 7:32 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
93 |
0 |
|
|
|
313529939 |
-Shu- |
G |
April 1, 2025, 7:21 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
93 |
0 |
|
|
|
313517488 |
sridhanush1208 |
G |
April 1, 2025, 5:46 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
93 |
0 |
|
|
|
313509258 |
PedroPacoca |
G |
April 1, 2025, 4:57 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
93 |
0 |
|
|
|
313500505 |
AboRady |
G |
April 1, 2025, 4:30 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
93 |
0 |
|
|
|
313553836 |
MrPerson |
G |
April 2, 2025, 2:55 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
93 |
102400 |
|
|
|
313551767 |
Mateo |
G |
April 2, 2025, 2:17 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
21 |
93 |
102400 |
|
|
|
313550609 |
N_z__ |
G |
April 2, 2025, 1:50 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
77 |
204800 |
|
|
|
313557312 |
SinhaSatwik |
G |
April 2, 2025, 3:48 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
78 |
0 |
|
|
|
313558708 |
threebody |
G |
April 2, 2025, 4:08 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
93 |
0 |
|
|
|
313546452 |
Evan2024 |
G |
April 2, 2025, 12:15 a.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
93 |
102400 |
|
|
|
313541685 |
Hori |
G |
April 1, 2025, 10:09 p.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
93 |
102400 |
|
|
|
313538678 |
namokaul |
G |
April 1, 2025, 9:09 p.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
93 |
102400 |
|
|
|
313538581 |
wronganswergod |
G |
April 1, 2025, 9:08 p.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
93 |
102400 |
|
|
|
313526516 |
Kelin |
G |
April 1, 2025, 6:50 p.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
93 |
102400 |
|
|
|
313521861 |
tih-a |
G |
April 1, 2025, 6:15 p.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
93 |
102400 |
|
|
|
313519568 |
Big_Dankakon |
G |
April 1, 2025, 5:59 p.m. |
OK |
C++23 (GCC 14-64, msys2) |
TESTS |
21 |
93 |
102400 |
|
|
|
313518284 |
ruban |
G |
April 1, 2025, 5:51 p.m. |
OK |
FPC |
TESTS |
21 |
202 |
174387200 |
|
|
|
313511821 |
pengin_2000 |
G |
April 1, 2025, 5:11 p.m. |
OK |
GNU C11 |
TESTS |
21 |
187 |
3276800 |
|
|
|
313520334 |
nikh27 |
G |
April 1, 2025, 6:04 p.m. |
OK |
Haskell |
TESTS |
21 |
1937 |
162816000 |
|
|
|
313513684 |
Hitarth_Thakkar |
G |
April 1, 2025, 5:22 p.m. |
OK |
Haskell |
TESTS |
21 |
1937 |
162816000 |
|
|
|
313510452 |
joshuaChoi |
G |
April 1, 2025, 5:03 p.m. |
OK |
Haskell |
TESTS |
21 |
1937 |
162816000 |
|
|
|
313515019 |
phongnc |
G |
April 1, 2025, 5:31 p.m. |
OK |
Java 21 |
TESTS |
21 |
889 |
7577600 |
|
|
|
313506414 |
Darkman01 |
G |
April 1, 2025, 4:42 p.m. |
OK |
Java 8 |
TESTS |
21 |
374 |
0 |
|
|
|
313515377 |
mythicalrocket |
G |
April 1, 2025, 5:33 p.m. |
OK |
PyPy 3 |
TESTS |
21 |
249 |
14540800 |
|
|
|
313556436 |
adriandabeast |
G |
April 2, 2025, 3:36 a.m. |
OK |
PyPy 3 |
TESTS |
21 |
796 |
19968000 |
|
|
|
313562466 |
TrollFaceAlpha hihitherethere |
G |
April 2, 2025, 4:58 a.m. |
OK |
PyPy 3 |
TESTS |
21 |
953 |
11878400 |
|
|
|
313537368 |
Khalid_Kamal_ |
G |
April 1, 2025, 8:50 p.m. |
OK |
PyPy 3 |
TESTS |
21 |
953 |
12083200 |
|
|
|
313531599 |
ryucc |
G |
April 1, 2025, 7:38 p.m. |
OK |
PyPy 3 |
TESTS |
21 |
1015 |
11161600 |
|
|
|
313520954 |
coder.sy |
G |
April 1, 2025, 6:08 p.m. |
OK |
PyPy 3 |
TESTS |
21 |
1421 |
12185600 |
|
|
|
313501454 |
jgs03177 |
G |
April 1, 2025, 4:31 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
155 |
10854400 |
|
|
|
313537241 |
Extile |
G |
April 1, 2025, 8:48 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
312 |
12902400 |
|
|
|
313528680 |
Om_Singh_ |
G |
April 1, 2025, 7:09 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
374 |
13414400 |
|
|
|
313504377 |
Mukundan314 |
G |
April 1, 2025, 4:34 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
421 |
13312000 |
|
|
|
313540232 |
YhuanDebeste |
G |
April 1, 2025, 9:38 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
499 |
31641600 |
|
|
|
313524870 |
potato52 |
G |
April 1, 2025, 6:37 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
499 |
31846400 |
|
|
|
313539931 |
ableenk |
G |
April 1, 2025, 9:33 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
500 |
11571200 |
|
|
|
313510999 |
PetrMinkin |
G |
April 1, 2025, 5:06 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
514 |
22528000 |
|
|
|
313509438 |
DarkTemplarDrop |
G |
April 1, 2025, 4:58 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
530 |
18329600 |
|
|
|
313503446 |
archik33 |
G |
April 1, 2025, 4:33 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
577 |
14233600 |
|
|
|
313509142 |
code_kaustubh |
G |
April 1, 2025, 4:56 p.m. |
OK |
Python 3 |
TESTS |
21 |
281 |
31232000 |
|
|
|
313519901 |
Pranav_19111 |
G |
April 1, 2025, 6:01 p.m. |
OK |
Python 3 |
TESTS |
21 |
390 |
22835200 |
|
|
|
313540505 |
algmyr |
G |
April 1, 2025, 9:44 p.m. |
OK |
Python 3 |
TESTS |
21 |
468 |
21913600 |
|
|
|
313514271 |
codsila |
G |
April 1, 2025, 5:26 p.m. |
OK |
Python 3 |
TESTS |
21 |
515 |
21299200 |
|
|
|
313519517 |
galiver2009 |
G |
April 1, 2025, 5:59 p.m. |
OK |
Python 3 |
TESTS |
21 |
546 |
27443200 |
|
|
|
313503543 |
squishybanana04 |
G |
April 1, 2025, 4:33 p.m. |
OK |
Python 3 |
TESTS |
21 |
593 |
18636800 |
|
|
|
313524034 |
ruhittanvir14 |
G |
April 1, 2025, 6:30 p.m. |
OK |
Python 3 |
TESTS |
21 |
687 |
19251200 |
|
|
remove filters
Back to search problems