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"Sam lives in Awesomeburg, its downtown has a triangular shape. Also, the following is true about the triangle: He calls a point on the downtown's border (that is the border of the triangle) safe if he can reach this point from at least one point of the line y = 0 walking along some straight line, without crossing the interior of the triangle. Find the total length of the unsafe parts of the downtown border. It can be proven that these parts are segments and their number is finite. Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Description of the test cases follows. Each test case contains three lines, each of them contains two integers x_i , y_i ( 0 <= x_i, y_i <= 10^9 ) -- coordinates of the vertices of the downtown's border. For each test case print a single 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 frac{|a - b|}{ max{(1, |b|)}} <= 10^{-9} . In the picture, the downtowns of the first three test cases are illustrated. Triangles are enumerated according to the indices of test cases they belong to. In the first two test cases, all points on the borders of the downtowns are safe, thus the answers are 0 . In the following picture unsafe points for the third test case are marked with black color: In the fourth test case, all points on the border of the downtown are safe. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
147511098 |
niraj0109 |
A |
Feb. 23, 2022, 7:48 p.m. |
OK |
Clang++17 Diagnostics |
TESTS |
5 |
62 |
0 |
|
|
147483120 |
cccccX |
A |
Feb. 23, 2022, 2:37 p.m. |
OK |
GNU C11 |
TESTS |
5 |
15 |
0 |
|
|
147486640 |
matlab |
A |
Feb. 23, 2022, 3:10 p.m. |
OK |
GNU C11 |
TESTS |
5 |
15 |
0 |
|
|
147499832 |
predawn |
A |
Feb. 23, 2022, 5:26 p.m. |
OK |
GNU C11 |
TESTS |
5 |
15 |
0 |
|
|
147474504 |
vineeth.bhat |
A |
Feb. 23, 2022, 1:24 p.m. |
OK |
GNU C11 |
TESTS |
5 |
15 |
0 |
|
|
147531045 |
Vijay_24 |
A |
Feb. 24, 2022, 4:11 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147529613 |
adopt |
A |
Feb. 24, 2022, 3:43 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147529249 |
Anit2003 |
A |
Feb. 24, 2022, 3:35 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147528492 |
Zoomy |
A |
Feb. 24, 2022, 3:19 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147536422 |
happycrazzy |
A |
Feb. 24, 2022, 5:42 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147527088 |
maomaotu |
A |
Feb. 24, 2022, 2:46 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147535171 |
white_boat |
A |
Feb. 24, 2022, 5:23 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147534343 |
shadow0811 |
A |
Feb. 24, 2022, 5:11 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147532535 |
simplekind |
A |
Feb. 24, 2022, 4:39 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147532291 |
SYZThanos |
A |
Feb. 24, 2022, 4:35 a.m. |
OK |
GNU C++14 |
TESTS |
5 |
0 |
0 |
|
|
147536259 |
sakshichn_20 |
A |
Feb. 24, 2022, 5:39 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147536216 |
DoIdo |
A |
Feb. 24, 2022, 5:38 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147535659 |
SHER____ |
A |
Feb. 24, 2022, 5:31 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147535515 |
varunprohit |
A |
Feb. 24, 2022, 5:29 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147535199 |
usx20131 |
A |
Feb. 24, 2022, 5:24 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147535186 |
Dzenia |
A |
Feb. 24, 2022, 5:23 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147534701 |
kllin |
A |
Feb. 24, 2022, 5:16 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147534438 |
NishantBhosale |
A |
Feb. 24, 2022, 5:12 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147536674 |
b2kumar |
A |
Feb. 24, 2022, 5:46 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147537420 |
Merajjj |
A |
Feb. 24, 2022, 5:56 a.m. |
OK |
GNU C++17 |
TESTS |
5 |
0 |
0 |
|
|
147523960 |
znhy |
A |
Feb. 24, 2022, 1:20 a.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147536302 |
ghxx040406 |
A |
Feb. 24, 2022, 5:40 a.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147533125 |
LAB |
A |
Feb. 24, 2022, 4:50 a.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147528569 |
S_aj |
A |
Feb. 24, 2022, 3:21 a.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147525633 |
ashwAni234 |
A |
Feb. 24, 2022, 2:09 a.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147523393 |
SmolBrain |
A |
Feb. 24, 2022, 1:04 a.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147522993 |
NeuraXmy |
A |
Feb. 24, 2022, 12:53 a.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147513979 |
jesse_pinkman_619 |
A |
Feb. 23, 2022, 8:37 p.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147506028 |
JumanAlhayajneh |
A |
Feb. 23, 2022, 6:33 p.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147502597 |
anshukumar_729 |
A |
Feb. 23, 2022, 5:56 p.m. |
OK |
GNU C++17 (64) |
TESTS |
5 |
0 |
0 |
|
|
147534685 |
Naruto_cm |
A |
Feb. 24, 2022, 5:16 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147534141 |
and20211109 |
A |
Feb. 24, 2022, 5:07 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147532877 |
sharmaharisam |
A |
Feb. 24, 2022, 4:45 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147532737 |
Raj_Aditya |
A |
Feb. 24, 2022, 4:43 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147532593 |
joe_t78 |
A |
Feb. 24, 2022, 4:40 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147531735 |
Platanito_Frito |
A |
Feb. 24, 2022, 4:25 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147531500 |
wrong_ac |
A |
Feb. 24, 2022, 4:20 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147531144 |
vedant_1 |
A |
Feb. 24, 2022, 4:13 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147534729 |
stricks |
A |
Feb. 24, 2022, 5:16 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147536833 |
SLFatemi |
A |
Feb. 24, 2022, 5:48 a.m. |
OK |
GNU C++20 (64) |
TESTS |
5 |
0 |
0 |
|
|
147510410 |
TomazGomes |
A |
Feb. 23, 2022, 7:38 p.m. |
OK |
Haskell |
TESTS |
5 |
31 |
0 |
|
|
147497706 |
Srikanth1777 |
A |
Feb. 23, 2022, 5:01 p.m. |
OK |
Java 11 |
TESTS |
5 |
155 |
0 |
|
|
147535505 |
singhshivsm20001 |
A |
Feb. 24, 2022, 5:28 a.m. |
OK |
Java 11 |
TESTS |
5 |
155 |
0 |
|
|
147529219 |
reverenc |
A |
Feb. 24, 2022, 3:34 a.m. |
OK |
Java 11 |
TESTS |
5 |
155 |
0 |
|
|
147509318 |
KarMa_ |
A |
Feb. 23, 2022, 7:22 p.m. |
OK |
Java 11 |
TESTS |
5 |
155 |
0 |
|
|
147529391 |
dhruvil_8803 |
A |
Feb. 24, 2022, 3:38 a.m. |
OK |
Java 11 |
TESTS |
5 |
156 |
0 |
|
|
147495619 |
Eslam_Ahmed |
A |
Feb. 23, 2022, 4:38 p.m. |
OK |
Java 11 |
TESTS |
5 |
170 |
0 |
|
|
147483009 |
pras7946 |
A |
Feb. 23, 2022, 2:36 p.m. |
OK |
Java 11 |
TESTS |
5 |
170 |
0 |
|
|
147488101 |
Taha_Firoz |
A |
Feb. 23, 2022, 3:23 p.m. |
OK |
Java 11 |
TESTS |
5 |
170 |
0 |
|
|
147533888 |
_ryan18_ |
A |
Feb. 24, 2022, 5:03 a.m. |
OK |
Java 11 |
TESTS |
5 |
171 |
0 |
|
|
147536023 |
himanshu_0624 |
A |
Feb. 24, 2022, 5:36 a.m. |
OK |
Java 11 |
TESTS |
5 |
171 |
0 |
|
|
147476548 |
lcheeme1 |
A |
Feb. 23, 2022, 1:40 p.m. |
OK |
Java 8 |
TESTS |
5 |
77 |
0 |
|
|
147498847 |
Mohamed_A7med |
A |
Feb. 23, 2022, 5:14 p.m. |
OK |
Java 8 |
TESTS |
5 |
78 |
0 |
|
|
147500798 |
Shemo |
A |
Feb. 23, 2022, 5:38 p.m. |
OK |
Java 8 |
TESTS |
5 |
92 |
0 |
|
|
147500211 |
g906360 |
A |
Feb. 23, 2022, 5:30 p.m. |
OK |
Java 8 |
TESTS |
5 |
93 |
0 |
|
|
147476598 |
ak_ankit |
A |
Feb. 23, 2022, 1:41 p.m. |
OK |
Java 8 |
TESTS |
5 |
93 |
0 |
|
|
147489170 |
kocko |
A |
Feb. 23, 2022, 3:32 p.m. |
OK |
Java 8 |
TESTS |
5 |
93 |
0 |
|
|
147459211 |
ashutosh_patel |
A |
Feb. 23, 2022, 11:51 a.m. |
OK |
Java 8 |
TESTS |
5 |
93 |
0 |
|
|
147523394 |
sky9313 |
A |
Feb. 24, 2022, 1:04 a.m. |
OK |
Java 8 |
TESTS |
5 |
93 |
0 |
|
|
147490862 |
GauravKrv |
A |
Feb. 23, 2022, 3:47 p.m. |
OK |
Java 8 |
TESTS |
5 |
108 |
0 |
|
|
147484542 |
jhariharan99official |
A |
Feb. 23, 2022, 2:50 p.m. |
OK |
Java 8 |
TESTS |
5 |
108 |
0 |
|
|
147513828 |
nesco |
A |
Feb. 23, 2022, 8:34 p.m. |
OK |
Kotlin 1.4 |
TESTS |
5 |
124 |
204800 |
|
|
147500813 |
wbars |
A |
Feb. 23, 2022, 5:38 p.m. |
OK |
Kotlin 1.4 |
TESTS |
5 |
155 |
0 |
|
|
147474529 |
LeoPro |
A |
Feb. 23, 2022, 1:25 p.m. |
OK |
Kotlin 1.5 |
TESTS |
5 |
202 |
0 |
|
|
147481579 |
Killer_No.47 |
A |
Feb. 23, 2022, 2:23 p.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
0 |
204800 |
|
|
147458719 |
keruoya |
A |
Feb. 23, 2022, 11:49 a.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
15 |
0 |
|
|
147469086 |
Levi__Ackerman |
A |
Feb. 23, 2022, 12:50 p.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
15 |
0 |
|
|
147465155 |
mishra-aayush |
A |
Feb. 23, 2022, 12:09 p.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
15 |
0 |
|
|
147533604 |
WangChaoqwe |
A |
Feb. 24, 2022, 4:58 a.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
15 |
0 |
|
|
147516750 |
M7md3sam070 |
A |
Feb. 23, 2022, 9:39 p.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
15 |
0 |
|
|
147499921 |
Ayman_Attili26 |
A |
Feb. 23, 2022, 5:27 p.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
15 |
0 |
|
|
147478526 |
edfearay11 |
A |
Feb. 23, 2022, 1:57 p.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
15 |
0 |
|
|
147470922 |
JustasIsTaken |
A |
Feb. 23, 2022, 1:01 p.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
15 |
0 |
|
|
147461179 |
A-soul-Ava |
A |
Feb. 23, 2022, 11:58 a.m. |
OK |
MS C++ 2017 |
TESTS |
5 |
31 |
0 |
|
|
147508296 |
tabibi |
A |
Feb. 23, 2022, 7:05 p.m. |
OK |
.NET Core C# |
TESTS |
5 |
62 |
1126400 |
|
|
147462808 |
LisaV |
A |
Feb. 23, 2022, 12:03 p.m. |
OK |
.NET Core C# |
TESTS |
5 |
77 |
1331200 |
|
|
147477568 |
rsFalse |
A |
Feb. 23, 2022, 1:49 p.m. |
OK |
Perl |
TESTS |
5 |
30 |
0 |
|
|
147473953 |
rsFalse |
A |
Feb. 23, 2022, 1:21 p.m. |
OK |
Perl |
TESTS |
5 |
30 |
0 |
|
|
147467604 |
ambs_ |
A |
Feb. 23, 2022, 12:43 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
77 |
2150400 |
|
|
147513916 |
Pheonix23 |
A |
Feb. 23, 2022, 8:36 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
77 |
2969600 |
|
|
147517800 |
MistaAsh |
A |
Feb. 23, 2022, 10:08 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
92 |
1638400 |
|
|
147479451 |
harshitgarg02 |
A |
Feb. 23, 2022, 2:05 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
93 |
2662400 |
|
|
147507034 |
KanishkGoel |
A |
Feb. 23, 2022, 6:47 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
109 |
1945600 |
|
|
147491343 |
unknownSolver |
A |
Feb. 23, 2022, 3:52 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
139 |
3379200 |
|
|
147521013 |
chitraketu |
A |
Feb. 23, 2022, 11:53 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
155 |
4505600 |
|
|
147489334 |
mohamedsamirtkd |
A |
Feb. 23, 2022, 3:33 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
155 |
4915200 |
|
|
147521695 |
noobsatish |
A |
Feb. 24, 2022, 12:14 a.m. |
OK |
PyPy 3 |
TESTS |
5 |
155 |
5836800 |
|
|
147486478 |
KabirIvan |
A |
Feb. 23, 2022, 3:08 p.m. |
OK |
PyPy 3 |
TESTS |
5 |
170 |
4505600 |
|
|
147510814 |
crackermushroom |
A |
Feb. 23, 2022, 7:44 p.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
46 |
2560000 |
|
|
147474607 |
_icy_ |
A |
Feb. 23, 2022, 1:25 p.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
61 |
2457600 |
|
|
147504540 |
a_vantik_a |
A |
Feb. 23, 2022, 6:16 p.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
61 |
2764800 |
|
|
147527799 |
aman404found |
A |
Feb. 24, 2022, 3:05 a.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
62 |
2457600 |
|
|
147481588 |
generic_placeholder_name |
A |
Feb. 23, 2022, 2:23 p.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
62 |
3481600 |
|
|
147531289 |
aman_m42 |
A |
Feb. 24, 2022, 4:16 a.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
77 |
3686400 |
|
|
147486080 |
mathdude42 |
A |
Feb. 23, 2022, 3:05 p.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
92 |
5017600 |
|
|
147496554 |
nitish420 |
A |
Feb. 23, 2022, 4:49 p.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
93 |
4915200 |
|
|
147507507 |
del-user-774348 |
A |
Feb. 23, 2022, 6:54 p.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
93 |
5529600 |
|
|
147499212 |
anupam_sudh |
A |
Feb. 23, 2022, 5:18 p.m. |
OK |
PyPy 3-64 |
TESTS |
5 |
108 |
5222400 |
|
|
147500896 |
OLOGY |
A |
Feb. 23, 2022, 5:39 p.m. |
OK |
Python 2 |
TESTS |
5 |
31 |
307200 |
|
|
147531890 |
sujan_kumar |
A |
Feb. 24, 2022, 4:27 a.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147514663 |
Feras.Barahmeh |
A |
Feb. 23, 2022, 8:51 p.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147510641 |
D_Dima |
A |
Feb. 23, 2022, 7:42 p.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147509127 |
ashikarjen |
A |
Feb. 23, 2022, 7:19 p.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147480079 |
b20190 |
A |
Feb. 23, 2022, 2:10 p.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147472286 |
deepak19 |
A |
Feb. 23, 2022, 1:09 p.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147462819 |
tanmaysharma17 |
A |
Feb. 23, 2022, 12:03 p.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147461298 |
PAGAN |
A |
Feb. 23, 2022, 11:58 a.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147458961 |
afa_11 |
A |
Feb. 23, 2022, 11:50 a.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147458472 |
MaveV |
A |
Feb. 23, 2022, 11:48 a.m. |
OK |
Python 3 |
TESTS |
5 |
31 |
0 |
|
|
147484037 |
clause |
A |
Feb. 23, 2022, 2:45 p.m. |
OK |
Rust 2021 |
TESTS |
5 |
15 |
0 |
|
|
remove filters
Back to search problems