Codeforces Round 635 (Div. 1)

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.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1336 Codeforces Round 635 (Div. 1) FINISHED False 9000 144861899 April 15, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11415 ) B Xenia and Colorful Gems PROGRAMMING binary search greedy math sortings two pointers 1800

B'Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself. Recently Xenia has bought n_r red gems, n_g green gems and n_b blue gems. Each of the gems has a weight. Now, she is going to pick three gems. Xenia loves colorful things, so she will pick exactly one gem of each color. Xenia loves balance, so she will try to pick gems with little difference in weight. Specifically, supposing the weights of the picked gems are x , y and z , Xenia wants to find the minimum value of (x-y)^2+(y-z)^2+(z-x)^2 . As her dear friend, can you help her? The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. Then t test cases follow. The first line of each test case contains three integers n_r,n_g,n_b ( 1 <= n_r,n_g,n_b <= 10^5 ) -- the number of red gems, green gems and blue gems respectively. The second line of each test case contains n_r integers r_1,r_2, ldots,r_{n_r} ( 1 <= r_i <= 10^9 ) -- r_i is the weight of the i -th red gem. The third line of each test case contains n_g integers g_1,g_2, ldots,g_{n_g} ( 1 <= g_i <= 10^9 ) -- g_i is the weight of the i -th green gem. The fourth line of each test case contains n_b integers b_1,b_2, ldots,b_{n_b} ( 1 <= b_i <= 10^9 ) -- b_i is the weight of the i -th blue gem. It is guaranteed that sum n_r <= 10^5 , sum n_g <= 10^5 , sum n_b <= 10^5 (the sum for all test cases). For each test case, print a line contains one integer -- the minimum value which Xenia wants to find. In the first test case, Xenia has the following gems: If she picks the red gem with weight 7 , the green gem with weight 6 , and the blue gem with weight 4 , she will achieve the most balanced selection with (x-y)^2+(y-z)^2+(z-x)^2=(7-6)^2+(6-4)'...

Tutorials

Codeforces Round #635 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
76837840 Gassa B April 15, 2020, 3:01 p.m. OK D TESTS 94 187 13516800 1800
76844516 hos.lyric B April 15, 2020, 3:09 p.m. OK D TESTS 94 280 23961600 1800
76877614 pengin_2000 B April 15, 2020, 4:18 p.m. OK GNU C11 TESTS 94 187 3276800 1800
76856571 physics0523 B April 15, 2020, 3:30 p.m. OK GNU C11 TESTS 94 249 20992000 1800
78008374 stal_xy23z7b8 B April 25, 2020, 9:35 a.m. OK GNU C++11 TESTS 94 62 1228800 1800
76961988 Fuyuki B April 16, 2020, 11:12 a.m. OK GNU C++11 TESTS 94 62 1331200 1800
76839520 stal_xy23z7b8 B April 15, 2020, 3:03 p.m. OK GNU C++11 TESTS 94 62 1433600 1800
76844776 Wangxuye B April 15, 2020, 3:10 p.m. OK GNU C++11 TESTS 94 62 1638400 1800
76841209 msuwakow B April 15, 2020, 3:05 p.m. OK GNU C++11 TESTS 94 62 2355200 1800
76868735 z7z_Eta B April 15, 2020, 3:56 p.m. OK GNU C++11 TESTS 94 62 3276800 1800
76916172 superbigjuruo B April 16, 2020, 12:45 a.m. OK GNU C++11 TESTS 94 62 4300800 1800
76840996 AloneKnight B April 15, 2020, 3:04 p.m. OK GNU C++11 TESTS 94 62 9830400 1800
77140609 cxcxccx B April 18, 2020, 4:21 a.m. OK GNU C++11 TESTS 94 77 1433600 1800
76978483 Bill_Yang B April 16, 2020, 1:53 p.m. OK GNU C++11 TESTS 94 77 2150400 1800
76921317 pufanyi B April 16, 2020, 2:48 a.m. OK GNU C++14 TESTS 94 77 2662400 1800
76930977 QAQAutoMaton B April 16, 2020, 5:32 a.m. OK GNU C++14 TESTS 94 93 6656000 1800
76847425 Hyperbolic B April 15, 2020, 3:14 p.m. OK GNU C++14 TESTS 94 109 1945600 1800
76902619 danbanica B April 15, 2020, 7:12 p.m. OK GNU C++14 TESTS 94 124 1228800 1800
76888820 Amel_ B April 15, 2020, 4:48 p.m. OK GNU C++14 TESTS 94 124 1228800 1800
76857448 ayakut B April 15, 2020, 3:32 p.m. OK GNU C++14 TESTS 94 124 1228800 1800
76857073 silxi B April 15, 2020, 3:31 p.m. OK GNU C++14 TESTS 94 124 1228800 1800
76845328 peter112358 B April 15, 2020, 3:10 p.m. OK GNU C++14 TESTS 94 124 1228800 1800
76911351 boba5551 B April 15, 2020, 10:27 p.m. OK GNU C++14 TESTS 94 124 1228800 1800
77211852 ae04071 B April 18, 2020, 6:03 p.m. OK GNU C++14 TESTS 94 124 1228800 1800
76841264 JOHNKRAM B April 15, 2020, 3:05 p.m. OK GNU C++17 TESTS 94 62 14745600 1800
77142536 LayCurse B April 18, 2020, 5 a.m. OK GNU C++17 TESTS 94 62 98304000 1800
77622581 HatsuneMikuo B April 22, 2020, 8:25 a.m. OK GNU C++17 TESTS 94 77 4198400 1800
76832403 LayCurse B April 15, 2020, 2:55 p.m. OK GNU C++17 TESTS 94 77 98304000 1800
77622548 interestingLSY B April 22, 2020, 8:25 a.m. OK GNU C++17 TESTS 94 78 4198400 1800
76979679 kessido B April 16, 2020, 2:06 p.m. OK GNU C++17 TESTS 94 93 1228800 1800
76843572 yosupo B April 15, 2020, 3:08 p.m. OK GNU C++17 TESTS 94 109 4915200 1800
76918888 inszva B April 16, 2020, 1:53 a.m. OK GNU C++17 TESTS 94 109 6963200 1800
76922513 Unsterblicher_Geist B April 16, 2020, 3:13 a.m. OK GNU C++17 TESTS 94 109 7475200 1800
77645734 SUDAL B April 22, 2020, 12:35 p.m. OK GNU C++17 TESTS 94 124 1228800 1800
76902860 Egor B April 15, 2020, 7:17 p.m. OK GNU C++17 (64) TESTS 94 62 1433600 1800
77635039 hltk B April 22, 2020, 10:46 a.m. OK GNU C++17 (64) TESTS 94 93 1228800 1800
76928892 besieger B April 16, 2020, 5:02 a.m. OK GNU C++17 (64) TESTS 94 93 1228800 1800
77763613 Felerius B April 23, 2020, 2:18 p.m. OK GNU C++17 (64) TESTS 94 93 1228800 1800
77635108 hltk B April 22, 2020, 10:47 a.m. OK GNU C++17 (64) TESTS 94 93 1228800 1800
76850394 Ernestico B April 15, 2020, 3:19 p.m. OK GNU C++17 (64) TESTS 94 93 2150400 1800
76847824 Parsa84 B April 15, 2020, 3:14 p.m. OK GNU C++17 (64) TESTS 94 93 2457600 1800
76829267 Kostroma B April 15, 2020, 2:52 p.m. OK GNU C++17 (64) TESTS 94 93 2457600 1800
76854309 Thuleanx B April 15, 2020, 3:26 p.m. OK GNU C++17 (64) TESTS 94 93 2457600 1800
77762401 Felerius B April 23, 2020, 2:11 p.m. OK GNU C++17 (64) TESTS 94 93 2457600 1800
76943077 sonlh07 B April 16, 2020, 7:47 a.m. OK Go TESTS 94 358 4812800 1800
76827565 uwi B April 15, 2020, 2:50 p.m. OK Java 11 TESTS 94 311 0 1800
76869717 Musin B April 15, 2020, 3:59 p.m. OK Java 11 TESTS 94 342 0 1800
76856837 mikit B April 15, 2020, 3:30 p.m. OK Java 11 TESTS 94 342 819200 1800
76843584 adamjamil B April 15, 2020, 3:08 p.m. OK Java 11 TESTS 94 342 921600 1800
77003476 armoking B April 16, 2020, 5:51 p.m. OK Java 11 TESTS 94 389 1945600 1800
76902429 sajith B April 15, 2020, 7:10 p.m. OK Java 11 TESTS 94 421 20992000 1800
77313962 prituladima B April 19, 2020, 9:41 p.m. OK Java 11 TESTS 94 530 102400 1800
77204755 prituladima B April 18, 2020, 4:32 p.m. OK Java 11 TESTS 94 545 102400 1800
77220444 prituladima B April 18, 2020, 8:01 p.m. OK Java 11 TESTS 94 545 204800 1800
77205225 prituladima B April 18, 2020, 4:38 p.m. OK Java 11 TESTS 94 577 204800 1800
76844507 StayAwayFromBitches B April 15, 2020, 3:09 p.m. OK Java 8 TESTS 94 218 0 1800
76908639 procrastinate7 B April 15, 2020, 9:29 p.m. OK Java 8 TESTS 94 218 4812800 1800
76873557 DarLam B April 15, 2020, 4:08 p.m. OK Java 8 TESTS 94 233 5120000 1800
77166974 yaoct B April 18, 2020, 9:56 a.m. OK Java 8 TESTS 94 233 7372800 1800
77287293 di_halt B April 19, 2020, 2:59 p.m. OK Java 8 TESTS 94 249 4710400 1800
77288051 di_halt B April 19, 2020, 3:07 p.m. OK Java 8 TESTS 94 249 4812800 1800
76835410 cwise B April 15, 2020, 2:58 p.m. OK Java 8 TESTS 94 249 25395200 1800
77299566 nw_cpp B April 19, 2020, 5:28 p.m. OK Java 8 TESTS 94 327 9216000 1800
76868449 golions B April 15, 2020, 3:56 p.m. OK Java 8 TESTS 94 358 7680000 1800
77072080 r_sutaria B April 17, 2020, 12:17 p.m. OK Java 8 TESTS 94 358 32153600 1800
76854953 elizarov B April 15, 2020, 3:27 p.m. OK Kotlin TESTS 94 655 10547200 1800
76841021 Tlatoani B April 15, 2020, 3:05 p.m. OK Kotlin TESTS 94 764 40550400 1800
76855625 koboshi B April 15, 2020, 3:28 p.m. OK Kotlin TESTS 94 873 9932800 1800
76879821 mban259 B April 15, 2020, 4:24 p.m. OK Mono C# TESTS 94 296 45056000 1800
76918361 camypaper B April 16, 2020, 1:40 a.m. OK Mono C# TESTS 94 405 116121600 1800
76861065 keymoon B April 15, 2020, 3:39 p.m. OK Mono C# TESTS 94 421 45158400 1800
76872539 lxhgww B April 15, 2020, 4:06 p.m. OK MS C++ TESTS 94 109 1228800 1800
76864497 NotEvenWrong B April 15, 2020, 3:47 p.m. OK MS C++ TESTS 94 140 4608000 1800
76968279 AleksanderBalobanov B April 16, 2020, 12:15 p.m. OK MS C++ 2017 TESTS 94 140 12083200 1800
77129238 Cifko B April 17, 2020, 10:29 p.m. OK MS C++ 2017 TESTS 94 156 2457600 1800
76850166 nukeykt B April 15, 2020, 3:18 p.m. OK MS C++ 2017 TESTS 94 156 2662400 1800
76875141 tarattata1 B April 15, 2020, 4:12 p.m. OK MS C++ 2017 TESTS 94 202 1228800 1800
76873836 egardoz01 B April 15, 2020, 4:09 p.m. OK MS C++ 2017 TESTS 94 202 1228800 1800
77384545 zyaad B April 20, 2020, 4:39 p.m. OK MS C++ 2017 TESTS 94 249 2560000 1800
77384887 zyaad B April 20, 2020, 4:44 p.m. OK MS C++ 2017 TESTS 94 265 2457600 1800
77385419 zyaad B April 20, 2020, 4:51 p.m. OK MS C++ 2017 TESTS 94 280 2457600 1800
76863679 P___ B April 15, 2020, 3:45 p.m. OK MS C++ 2017 TESTS 94 343 2457600 1800
76857391 danilgrig B April 15, 2020, 3:32 p.m. OK MS C++ 2017 TESTS 94 373 2457600 1800
77105310 rcpc-master B April 17, 2020, 5:14 p.m. OK PyPy 2 TESTS 94 1107 15052800 1800
76830622 pajenegod B April 15, 2020, 2:53 p.m. OK PyPy 2 TESTS 94 1715 23654400 1800
76876468 gilesg B April 15, 2020, 4:15 p.m. OK PyPy 2 TESTS 94 1746 15462400 1800
76862667 astrom.lars B April 15, 2020, 3:43 p.m. OK PyPy 2 TESTS 94 1809 19558400 1800
77698625 c1729 B April 22, 2020, 10:20 p.m. OK PyPy 2 TESTS 94 2588 18022400 1800
76849343 bcollet B April 15, 2020, 3:17 p.m. OK PyPy 2 TESTS 94 2620 14643200 1800
77276444 RRRocky B April 19, 2020, 1 p.m. OK PyPy 3 TESTS 94 733 14745600 1800
77066532 wathari1 B April 17, 2020, 11:23 a.m. OK PyPy 3 TESTS 94 1231 16998400 1800
77350909 a00920 B April 20, 2020, 10:50 a.m. OK PyPy 3 TESTS 94 1263 17408000 1800
76847087 qwertz73355a B April 15, 2020, 3:13 p.m. OK PyPy 3 TESTS 94 1310 16998400 1800
77356239 sersht B April 20, 2020, 11:53 a.m. OK PyPy 3 TESTS 94 1325 17305600 1800
77597027 rajkumar19084 B April 22, 2020, midnight OK PyPy 3 TESTS 94 1341 15052800 1800
77424889 sam997 B April 21, 2020, 4:13 a.m. OK PyPy 3 TESTS 94 1388 14438400 1800
77693740 SakshamK6 B April 22, 2020, 8:29 p.m. OK PyPy 3 TESTS 94 1388 15052800 1800
76841057 tamato B April 15, 2020, 3:05 p.m. OK PyPy 3 TESTS 94 1388 16179200 1800
77120276 Symmetry09 B April 17, 2020, 7:48 p.m. OK PyPy 3 TESTS 94 1388 30720000 1800
77341246 akanksha25 B April 20, 2020, 8:41 a.m. OK Python 3 TESTS 94 1465 18636800 1800
76942769 anky_raj B April 16, 2020, 7:44 a.m. OK Python 3 TESTS 94 1528 18636800 1800
77374435 LeierKing B April 20, 2020, 2:48 p.m. OK Python 3 TESTS 94 1824 18329600 1800
77384224 Professor_Anitha_Modi B April 20, 2020, 4:35 p.m. OK Python 3 TESTS 94 1825 18534400 1800
77109811 Eshan_19 B April 17, 2020, 5:59 p.m. OK Python 3 TESTS 94 2168 14643200 1800
77474386 tidu149 B April 21, 2020, 1:56 p.m. OK Python 3 TESTS 94 2386 15974400 1800
76965714 hidir B April 16, 2020, 11:49 a.m. OK Python 3 TESTS 94 2464 14745600 1800
76947660 Tashm B April 16, 2020, 8:38 a.m. OK Rust TESTS 94 108 6041600 1800
76892224 EbTech B April 15, 2020, 4:57 p.m. OK Rust TESTS 94 109 4812800 1800
76920718 sansen B April 16, 2020, 2:35 a.m. OK Rust TESTS 94 202 7065600 1800

remove filters

Back to search problems