Codeforces Global Round 5

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
1237 Codeforces Global Round 5 FINISHED False 9000 166202687 Oct. 16, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4389 ) C2 Balanced Removals (Harder) PROGRAMMING binary search constructive algorithms divide and conquer greedy implementation sortings 1900

B"This is a harder version of the problem. In this version, n <= 50 ,000 . There are n distinct points in three-dimensional space numbered from 1 to n . The i -th point has coordinates (x_i, y_i, z_i) . The number of points n is even. You'd like to remove all n points using a sequence of frac{n}{2} snaps. In one snap, you can remove any two points a and b that have not been removed yet and form a perfectly balanced pair. A pair of points a and b is perfectly balanced if no other point c (that has not been removed yet) lies within the axis-aligned minimum bounding box of points a and b . Formally, point c lies within the axis-aligned minimum bounding box of points a and b if and only if min(x_a, x_b) <= x_c <= max(x_a, x_b) , min(y_a, y_b) <= y_c <= max(y_a, y_b) , and min(z_a, z_b) <= z_c <= max(z_a, z_b) . Note that the bounding box might be degenerate. Find a way to remove all points in frac{n}{2} snaps. The first line contains a single integer n ( 2 <= n <= 50 ,000 ; n is even), denoting the number of points. Each of the next n lines contains three integers x_i , y_i , z_i ( -10^8 <= x_i, y_i, z_i <= 10^8 ), denoting the coordinates of the i -th point. No two points coincide. Output frac{n}{2} pairs of integers a_i, b_i ( 1 <= a_i, b_i <= n ), denoting the indices of points removed on snap i . Every integer between 1 and n , inclusive, must appear in your output exactly once. We can show that it is always possible to remove all points. If there are many solutions, output any of them. In the first example, here is what points and their corresponding bounding boxes look like (drawn in two dimensions for simplicity, as all points lie on z = 0 plane). Note that order of removing matters: for example, points 5 and 1$$"...

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62721354 Gassa C2 Oct. 16, 2019, 4:18 p.m. OK D TESTS 42 93 11673600 1900
62710018 iica C2 Oct. 16, 2019, 3:34 p.m. OK D TESTS 42 171 22835200 1900
62738640 rainboy C2 Oct. 16, 2019, 7:04 p.m. OK GNU C11 TESTS 42 156 1024000 1900
62711432 pengin_2000 C2 Oct. 16, 2019, 3:38 p.m. OK GNU C11 TESTS 42 156 1228800 1900
62763548 Chirography_11 C2 Oct. 17, 2019, 7:48 a.m. OK GNU C++11 TESTS 42 46 716800 1900
62764175 JKLover C2 Oct. 17, 2019, 8 a.m. OK GNU C++11 TESTS 42 46 819200 1900
62763206 AutumnKite C2 Oct. 17, 2019, 7:40 a.m. OK GNU C++11 TESTS 42 46 819200 1900
62762117 Pigbrain C2 Oct. 17, 2019, 7:15 a.m. OK GNU C++11 TESTS 42 46 819200 1900
62749464 FALLEN_GEMINI C2 Oct. 17, 2019, 12:07 a.m. OK GNU C++11 TESTS 42 46 819200 1900
62710228 llyc C2 Oct. 16, 2019, 3:34 p.m. OK GNU C++11 TESTS 42 46 819200 1900
62868828 Riccccchard C2 Oct. 18, 2019, 1:07 p.m. OK GNU C++11 TESTS 42 46 819200 1900
63071202 yasugongshang C2 Oct. 21, 2019, 12:26 p.m. OK GNU C++11 TESTS 42 46 819200 1900
62729480 hzwer C2 Oct. 16, 2019, 4:54 p.m. OK GNU C++11 TESTS 42 46 1024000 1900
62972958 _violet C2 Oct. 20, 2019, 7:34 a.m. OK GNU C++11 TESTS 42 46 1228800 1900
62875074 BeNoble C2 Oct. 18, 2019, 3:02 p.m. OK GNU C++14 TESTS 42 46 1331200 1900
62749261 CJK000 C2 Oct. 16, 2019, 11:57 p.m. OK GNU C++14 TESTS 42 61 819200 1900
62750255 Owen_codeisking C2 Oct. 17, 2019, 12:40 a.m. OK GNU C++14 TESTS 42 61 1638400 1900
63771966 AC_MATION C2 Oct. 30, 2019, 8:18 a.m. OK GNU C++14 TESTS 42 61 3174400 1900
62719149 daofaziran C2 Oct. 16, 2019, 4:08 p.m. OK GNU C++14 TESTS 42 61 3788800 1900
62775870 201831990439 C2 Oct. 17, 2019, 11:41 a.m. OK GNU C++14 TESTS 42 61 19251200 1900
62849892 winee C2 Oct. 18, 2019, 6:54 a.m. OK GNU C++14 TESTS 42 62 819200 1900
64687814 Maybach C2 Nov. 11, 2019, 12:16 p.m. OK GNU C++14 TESTS 42 62 819200 1900
63411428 ActorBlack C2 Oct. 26, 2019, 12:47 a.m. OK GNU C++14 TESTS 42 62 819200 1900
62752048 mayaohua2003 C2 Oct. 17, 2019, 2:06 a.m. OK GNU C++14 TESTS 42 62 819200 1900
62758686 Nice_to_meet_you C2 Oct. 17, 2019, 5:59 a.m. OK GNU C++17 TESTS 42 61 819200 1900
66515172 how_to_become_purple C2 Dec. 8, 2019, 6:32 p.m. OK GNU C++17 TESTS 42 61 3481600 1900
62764639 ZhihuiLiu C2 Oct. 17, 2019, 8:12 a.m. OK GNU C++17 TESTS 42 61 4096000 1900
62778771 90n C2 Oct. 17, 2019, 12:23 p.m. OK GNU C++17 TESTS 42 61 24064000 1900
62759631 eyesofgod123 C2 Oct. 17, 2019, 6:22 a.m. OK GNU C++17 TESTS 42 61 24064000 1900
63423730 Stupid_cdd C2 Oct. 26, 2019, 7:13 a.m. OK GNU C++17 TESTS 42 62 819200 1900
64721461 mangojunior C2 Nov. 12, 2019, 3:51 a.m. OK GNU C++17 TESTS 42 62 819200 1900
64335345 dima.arafat C2 Nov. 5, 2019, 9:29 p.m. OK GNU C++17 TESTS 42 62 819200 1900
63956449 YunGoon C2 Nov. 1, 2019, 2:04 a.m. OK GNU C++17 TESTS 42 62 819200 1900
62770988 wucstdio C2 Oct. 17, 2019, 10:16 a.m. OK GNU C++17 TESTS 42 62 819200 1900
62716610 synapse C2 Oct. 16, 2019, 3:58 p.m. OK Go TESTS 42 171 4505600 1900
65684134 machhra C2 Nov. 24, 2019, 9:21 p.m. OK Java 11 TESTS 42 327 0 1900
66677366 tusharjape007 C2 Dec. 12, 2019, 11:51 a.m. OK Java 11 TESTS 42 421 17305600 1900
62747797 derrick20 C2 Oct. 16, 2019, 10:48 p.m. OK Java 8 TESTS 42 155 0 1900
62890014 mbfeci C2 Oct. 18, 2019, 8 p.m. OK Java 8 TESTS 42 155 0 1900
65327694 Sharon C2 Nov. 19, 2019, 3:11 a.m. OK Java 8 TESTS 42 171 0 1900
63089704 coderbond007 C2 Oct. 21, 2019, 5:55 p.m. OK Java 8 TESTS 42 171 0 1900
64604123 pereb4ik C2 Nov. 9, 2019, 7:41 p.m. OK Java 8 TESTS 42 186 0 1900
62915375 develeper C2 Oct. 19, 2019, 8:32 a.m. OK Java 8 TESTS 42 186 0 1900
62779461 Garett C2 Oct. 17, 2019, 12:32 p.m. OK Java 8 TESTS 42 186 0 1900
62771404 offvivek524 C2 Oct. 17, 2019, 10:24 a.m. OK Java 8 TESTS 42 186 0 1900
62757459 shubhampandey18 C2 Oct. 17, 2019, 5:26 a.m. OK Java 8 TESTS 42 186 0 1900
62743418 Musin C2 Oct. 16, 2019, 8:34 p.m. OK Java 8 TESTS 42 186 0 1900
62756818 Spheniscine C2 Oct. 17, 2019, 5:08 a.m. OK Kotlin TESTS 42 265 7884800 1900
62756383 Spheniscine C2 Oct. 17, 2019, 4:55 a.m. OK Kotlin TESTS 42 280 8089600 1900
62756166 Spheniscine C2 Oct. 17, 2019, 4:48 a.m. OK Kotlin TESTS 42 280 8089600 1900
62708102 knightL C2 Oct. 16, 2019, 3:27 p.m. OK Kotlin TESTS 42 420 2150400 1900
62924260 Ahmadjon C2 Oct. 19, 2019, 10:53 a.m. OK Kotlin TESTS 42 499 819200 1900
62726595 Denzed C2 Oct. 16, 2019, 4:41 p.m. OK Kotlin TESTS 42 561 2457600 1900
62752870 huangwenlong C2 Oct. 17, 2019, 2:40 a.m. OK Kotlin TESTS 42 592 1126400 1900
62837048 darnley C2 Oct. 17, 2019, 11:26 p.m. OK Kotlin TESTS 42 608 20582400 1900
62752494 huangwenlong C2 Oct. 17, 2019, 2:24 a.m. OK Kotlin TESTS 42 639 1843200 1900
62836962 darnley C2 Oct. 17, 2019, 11:20 p.m. OK Kotlin TESTS 42 655 20684800 1900
62711088 azukun C2 Oct. 16, 2019, 3:37 p.m. OK Mono C# TESTS 42 155 9216000 1900
63731319 hyzhangzhy C2 Oct. 29, 2019, 2:07 p.m. OK Mono C# TESTS 42 234 11059200 1900
62758338 omikad C2 Oct. 17, 2019, 5:49 a.m. OK Mono C# TESTS 42 280 34201600 1900
62863098 vjudge2 C2 Oct. 18, 2019, 11:24 a.m. OK MS C++ TESTS 42 61 11878400 1900
62714777 tarattata1 C2 Oct. 16, 2019, 3:51 p.m. OK MS C++ TESTS 42 78 3072000 1900
62747508 pichulia C2 Oct. 16, 2019, 10:36 p.m. OK MS C++ 2017 TESTS 42 77 8499200 1900
62740729 AleksanderBalobanov C2 Oct. 16, 2019, 7:40 p.m. OK MS C++ 2017 TESTS 42 78 2355200 1900
62781930 ChaLemon C2 Oct. 17, 2019, 1:09 p.m. OK MS C++ 2017 TESTS 42 78 2662400 1900
63123978 cheng222 C2 Oct. 22, 2019, 12:15 p.m. OK MS C++ 2017 TESTS 42 78 5017600 1900
62729538 Ivan11 C2 Oct. 16, 2019, 4:54 p.m. OK MS C++ 2017 TESTS 42 93 3686400 1900
62861423 pmitkov C2 Oct. 18, 2019, 10:56 a.m. OK MS C++ 2017 TESTS 42 109 9830400 1900
62722579 q3540555 C2 Oct. 16, 2019, 4:23 p.m. OK MS C++ 2017 TESTS 42 155 11264000 1900
62717835 lonely_moon C2 Oct. 16, 2019, 4:03 p.m. OK MS C++ 2017 TESTS 42 202 2969600 1900
63921240 gs11008 C2 Oct. 31, 2019, 11:47 a.m. OK MS C++ 2017 TESTS 42 233 5017600 1900
62738676 dimasidorenko C2 Oct. 16, 2019, 7:04 p.m. OK MS C++ 2017 TESTS 42 234 10547200 1900
62826368 rsFalse C2 Oct. 17, 2019, 6:12 p.m. OK Perl TESTS 42 701 27033600 1900
62825802 rsFalse C2 Oct. 17, 2019, 6:02 p.m. OK Perl TESTS 42 811 27033600 1900
62732379 rsFalse C2 Oct. 16, 2019, 5:04 p.m. OK Perl TESTS 42 951 27136000 1900
62824558 rsFalse C2 Oct. 17, 2019, 5:38 p.m. OK Perl TESTS 42 982 27136000 1900
62820188 rsFalse C2 Oct. 17, 2019, 4:27 p.m. OK Perl TESTS 42 997 27033600 1900
62724213 kabeer27 C2 Oct. 16, 2019, 4:30 p.m. OK PyPy 2 TESTS 42 343 10240000 1900
62755192 MVP C2 Oct. 17, 2019, 4:11 a.m. OK PyPy 2 TESTS 42 358 12390400 1900
62767973 raj1307 C2 Oct. 17, 2019, 9:17 a.m. OK PyPy 2 TESTS 42 374 8704000 1900
62713161 pa.n.ik C2 Oct. 16, 2019, 3:45 p.m. OK PyPy 2 TESTS 42 623 38502400 1900
67323010 cftt C2 Dec. 21, 2019, 8:44 a.m. OK PyPy 3 TESTS 42 483 13619200 1900
62946679 nikeshthapa255 C2 Oct. 19, 2019, 5:37 p.m. OK PyPy 3 TESTS 42 514 14950400 1900
62887309 titia C2 Oct. 18, 2019, 6:53 p.m. OK PyPy 3 TESTS 42 530 16691200 1900
62724375 vinuthegr8 C2 Oct. 16, 2019, 4:31 p.m. OK PyPy 3 TESTS 42 545 13004800 1900
62705981 Kiri8128 C2 Oct. 16, 2019, 3:21 p.m. OK PyPy 3 TESTS 42 560 28160000 1900
62859126 kshitij_sodani C2 Oct. 18, 2019, 10:15 a.m. OK PyPy 3 TESTS 42 592 20787200 1900
62716941 pineriver C2 Oct. 16, 2019, 3:59 p.m. OK PyPy 3 TESTS 42 592 22835200 1900
62857914 kshitij_sodani C2 Oct. 18, 2019, 9:53 a.m. OK PyPy 3 TESTS 42 624 20480000 1900
62718747 syphon C2 Oct. 16, 2019, 4:07 p.m. OK PyPy 3 TESTS 42 654 21299200 1900
62710862 jakethekoenig C2 Oct. 16, 2019, 3:36 p.m. OK PyPy 3 TESTS 42 670 12697600 1900
62708384 nwi C2 Oct. 16, 2019, 3:28 p.m. OK Python 2 TESTS 42 452 8089600 1900
67166960 soumyasarkar1998 C2 Dec. 18, 2019, 3:53 p.m. OK Python 2 TESTS 42 561 14028800 1900
62970856 vishnutheerthep C2 Oct. 20, 2019, 6:51 a.m. OK Python 3 TESTS 42 421 8704000 1900
62727296 Jozik C2 Oct. 16, 2019, 4:44 p.m. OK Python 3 TESTS 42 452 9932800 1900
66772496 _tool_ C2 Dec. 13, 2019, 8:28 a.m. OK Python 3 TESTS 42 467 7680000 1900
64718884 n0body9200 C2 Nov. 12, 2019, 1:37 a.m. OK Python 3 TESTS 42 483 9420800 1900
66974129 sruthi_1729 C2 Dec. 15, 2019, 2:06 p.m. OK Python 3 TESTS 42 498 8089600 1900
62755275 NocturneBflat C2 Oct. 17, 2019, 4:15 a.m. OK Python 3 TESTS 42 499 12390400 1900
62859072 auouo C2 Oct. 18, 2019, 10:14 a.m. OK Python 3 TESTS 42 514 8704000 1900
62829137 FlyingBag65 C2 Oct. 17, 2019, 7:06 p.m. OK Python 3 TESTS 42 514 13824000 1900
62732204 Ivan_Tea C2 Oct. 16, 2019, 5:04 p.m. OK Python 3 TESTS 42 530 14131200 1900
62727234 kartikay26 C2 Oct. 16, 2019, 4:44 p.m. OK Python 3 TESTS 42 545 14438400 1900
67968317 gearjack C2 Dec. 30, 2019, 2:06 p.m. OK Rust TESTS 42 62 4915200 1900
63646264 gu_castle C2 Oct. 28, 2019, 9:48 a.m. OK Rust TESTS 42 280 4096000 1900
67497962 manta1130 C2 Dec. 24, 2019, 1:24 a.m. OK Rust TESTS 42 327 13824000 1900

remove filters

Back to search problems