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 160586699 Oct. 16, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6113 ) C1 Balanced Removals (Easier) PROGRAMMING constructive algorithms geometry greedy 1600

B"This is an easier version of the problem. In this version, n <= 2000 . 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 <= 2000 ; 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 don"...

Tutorials

T

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
62752294 NoendHu C1 Oct. 17, 2019, 2:17 a.m. OK Clang++17 Diagnostics TESTS 41 46 0 1600
66080576 the-code-innovator C1 Nov. 30, 2019, 10:54 p.m. OK Clang++17 Diagnostics TESTS 41 779 1126400 1600
62710149 iica C1 Oct. 16, 2019, 3:34 p.m. OK D TESTS 41 31 4300800 1600
62707638 daut-dlang C1 Oct. 16, 2019, 3:26 p.m. OK D TESTS 41 202 4198400 1600
62704194 ruban C1 Oct. 16, 2019, 3:16 p.m. OK Delphi TESTS 41 109 47616000 1600
62726759 Just_Matvey C1 Oct. 16, 2019, 4:42 p.m. OK FPC TESTS 41 46 0 1600
62738658 rainboy C1 Oct. 16, 2019, 7:04 p.m. OK GNU C11 TESTS 41 31 1024000 1600
62711548 pengin_2000 C1 Oct. 16, 2019, 3:39 p.m. OK GNU C11 TESTS 41 31 1228800 1600
62717404 Chipe1 C1 Oct. 16, 2019, 4:01 p.m. OK GNU C11 TESTS 41 46 0 1600
62896394 luogu_bot4 C1 Oct. 19, 2019, 12:28 a.m. OK GNU C++11 TESTS 41 30 1228800 1600
62716314 liangjingtao C1 Oct. 16, 2019, 3:56 p.m. OK GNU C++11 TESTS 41 30 1228800 1600
63120230 zlkqlyc C1 Oct. 22, 2019, 10:57 a.m. OK GNU C++11 TESTS 41 31 0 1600
62869326 menxin C1 Oct. 18, 2019, 1:16 p.m. OK GNU C++11 TESTS 41 31 0 1600
62782871 gemini_man C1 Oct. 17, 2019, 1:23 p.m. OK GNU C++11 TESTS 41 31 0 1600
62777249 Amayama C1 Oct. 17, 2019, 12:01 p.m. OK GNU C++11 TESTS 41 31 0 1600
62767865 zengpeichen C1 Oct. 17, 2019, 9:15 a.m. OK GNU C++11 TESTS 41 31 0 1600
65168392 Akasaka C1 Nov. 16, 2019, 2:11 p.m. OK GNU C++11 TESTS 41 31 0 1600
63381845 jzp2006 C1 Oct. 25, 2019, 12:42 p.m. OK GNU C++11 TESTS 41 31 0 1600
67280113 vjudge1 C1 Dec. 20, 2019, 12:52 p.m. OK GNU C++11 TESTS 41 31 0 1600
62760061 darshankdarji C1 Oct. 17, 2019, 6:32 a.m. OK GNU C++14 TESTS 41 15 204800 1600
69571071 tytanium C1 Jan. 26, 2020, 2:06 p.m. OK GNU C++14 TESTS 41 15 204800 1600
63620643 meshanya C1 Oct. 27, 2019, 10:38 p.m. OK GNU C++14 TESTS 41 15 307200 1600
62773195 zhou2003 C1 Oct. 17, 2019, 10:58 a.m. OK GNU C++14 TESTS 41 15 2457600 1600
63374397 xyz111 C1 Oct. 25, 2019, 10:31 a.m. OK GNU C++14 TESTS 41 15 3584000 1600
62722257 firiexp C1 Oct. 16, 2019, 4:22 p.m. OK GNU C++14 TESTS 41 30 204800 1600
63434620 Svapnil007 C1 Oct. 26, 2019, 10:14 a.m. OK GNU C++14 TESTS 41 30 204800 1600
62879968 sagnik98 C1 Oct. 18, 2019, 4:31 p.m. OK GNU C++14 TESTS 41 30 307200 1600
62829797 dshahid380 C1 Oct. 17, 2019, 7:21 p.m. OK GNU C++14 TESTS 41 30 307200 1600
62779999 navneet.h C1 Oct. 17, 2019, 12:40 p.m. OK GNU C++14 TESTS 41 30 307200 1600
63927953 AayushAC1998 C1 Oct. 31, 2019, 1:32 p.m. OK GNU C++17 TESTS 41 15 409600 1600
65930080 ioyeoa C1 Nov. 28, 2019, 8:26 p.m. OK GNU C++17 TESTS 41 15 409600 1600
68987570 Acacac_ple C1 Jan. 17, 2020, 1:03 p.m. OK GNU C++17 TESTS 41 30 0 1600
65037090 manovik18 C1 Nov. 15, 2019, 12:03 p.m. OK GNU C++17 TESTS 41 30 0 1600
62955377 Anunay1605 C1 Oct. 19, 2019, 8:13 p.m. OK GNU C++17 TESTS 41 30 102400 1600
62708500 PavelKunyavskiy C1 Oct. 16, 2019, 3:29 p.m. OK GNU C++17 TESTS 41 30 102400 1600
62737712 keko37 C1 Oct. 16, 2019, 6:48 p.m. OK GNU C++17 TESTS 41 30 204800 1600
62766855 Ricoprogrammer C1 Oct. 17, 2019, 8:56 a.m. OK GNU C++17 TESTS 41 30 204800 1600
67067369 anuraganand C1 Dec. 17, 2019, 11:35 a.m. OK GNU C++17 TESTS 41 30 204800 1600
65554766 Eliden C1 Nov. 22, 2019, 8:53 p.m. OK GNU C++17 TESTS 41 30 307200 1600
62706143 synapse C1 Oct. 16, 2019, 3:21 p.m. OK Go TESTS 41 62 0 1600
65684153 machhra C1 Nov. 24, 2019, 9:22 p.m. OK Java 11 TESTS 41 202 0 1600
63298637 Shady51 C1 Oct. 24, 2019, 1:39 p.m. OK Java 11 TESTS 41 202 0 1600
67256656 lightseba C1 Dec. 19, 2019, 10:57 p.m. OK Java 11 TESTS 41 218 0 1600
62976289 mufaddalnaya C1 Oct. 20, 2019, 8:42 a.m. OK Java 8 TESTS 41 124 0 1600
65327729 Sharon C1 Nov. 19, 2019, 3:13 a.m. OK Java 8 TESTS 41 124 0 1600
63089725 coderbond007 C1 Oct. 21, 2019, 5:56 p.m. OK Java 8 TESTS 41 124 0 1600
62971534 mufaddalnaya C1 Oct. 20, 2019, 7:05 a.m. OK Java 8 TESTS 41 124 0 1600
62969392 AhmedZ C1 Oct. 20, 2019, 6:18 a.m. OK Java 8 TESTS 41 124 0 1600
62915238 develeper C1 Oct. 19, 2019, 8:30 a.m. OK Java 8 TESTS 41 124 0 1600
62889984 mbfeci C1 Oct. 18, 2019, 7:59 p.m. OK Java 8 TESTS 41 124 0 1600
62771361 offvivek524 C1 Oct. 17, 2019, 10:23 a.m. OK Java 8 TESTS 41 124 0 1600
62747783 derrick20 C1 Oct. 16, 2019, 10:48 p.m. OK Java 8 TESTS 41 124 0 1600
62747148 bking11 C1 Oct. 16, 2019, 10:21 p.m. OK Java 8 TESTS 41 124 0 1600
62755266 Spheniscine C1 Oct. 17, 2019, 4:14 a.m. OK Kotlin TESTS 41 171 307200 1600
62736005 david_varela C1 Oct. 16, 2019, 6:23 p.m. OK Kotlin TESTS 41 202 716800 1600
62836608 darnley C1 Oct. 17, 2019, 11:03 p.m. OK Kotlin TESTS 41 202 819200 1600
62836945 darnley C1 Oct. 17, 2019, 11:19 p.m. OK Kotlin TESTS 41 202 1024000 1600
62707964 knightL C1 Oct. 16, 2019, 3:27 p.m. OK Kotlin TESTS 41 202 1843200 1600
62836916 darnley C1 Oct. 17, 2019, 11:18 p.m. OK Kotlin TESTS 41 218 819200 1600
62836552 darnley C1 Oct. 17, 2019, 11:01 p.m. OK Kotlin TESTS 41 218 1843200 1600
62836489 darnley C1 Oct. 17, 2019, 10:57 p.m. OK Kotlin TESTS 41 233 1843200 1600
62727420 Glushen C1 Oct. 16, 2019, 4:45 p.m. OK Kotlin TESTS 41 249 819200 1600
62715975 Ahmadjon C1 Oct. 16, 2019, 3:55 p.m. OK Kotlin TESTS 41 249 819200 1600
62758378 omikad C1 Oct. 17, 2019, 5:50 a.m. OK Mono C# TESTS 41 62 5734400 1600
62709380 azukun C1 Oct. 16, 2019, 3:32 p.m. OK Mono C# TESTS 41 77 2662400 1600
65801163 eki C1 Nov. 27, 2019, 7:31 a.m. OK Mono C# TESTS 41 93 819200 1600
64287258 tongtongac01 C1 Nov. 5, 2019, 5:28 a.m. OK Mono C# TESTS 41 124 4505600 1600
62712589 chika0707 C1 Oct. 16, 2019, 3:43 p.m. OK Mono C# TESTS 41 233 4403200 1600
62913452 vjudge5 C1 Oct. 19, 2019, 8:01 a.m. OK MS C++ TESTS 41 31 0 1600
68741999 vjudge2 C1 Jan. 14, 2020, 1:54 a.m. OK MS C++ TESTS 41 46 0 1600
62704504 tarattata1 C1 Oct. 16, 2019, 3:17 p.m. OK MS C++ TESTS 41 46 102400 1600
62717478 yzhyzh C1 Oct. 16, 2019, 4:01 p.m. OK MS C++ TESTS 41 46 102400 1600
68144758 Gleb_Dubosarskii C1 Jan. 4, 2020, 3:21 a.m. OK MS C++ TESTS 41 46 6553600 1600
62780074 vjudge1 C1 Oct. 17, 2019, 12:41 p.m. OK MS C++ TESTS 41 545 102400 1600
63921220 gs11008 C1 Oct. 31, 2019, 11:46 a.m. OK MS C++ 2017 TESTS 41 31 204800 1600
62728919 youx C1 Oct. 16, 2019, 4:51 p.m. OK MS C++ 2017 TESTS 41 31 512000 1600
62740849 AleksanderBalobanov C1 Oct. 16, 2019, 7:42 p.m. OK MS C++ 2017 TESTS 41 31 1638400 1600
62781891 ChaLemon C1 Oct. 17, 2019, 1:09 p.m. OK MS C++ 2017 TESTS 41 31 2662400 1600
62704933 pichulia C1 Oct. 16, 2019, 3:18 p.m. OK MS C++ 2017 TESTS 41 31 8499200 1600
62709859 j2v C1 Oct. 16, 2019, 3:33 p.m. OK MS C++ 2017 TESTS 41 46 0 1600
62954479 abhishek_1 C1 Oct. 19, 2019, 7:52 p.m. OK MS C++ 2017 TESTS 41 46 0 1600
62714255 NSedov C1 Oct. 16, 2019, 3:49 p.m. OK MS C++ 2017 TESTS 41 46 102400 1600
62714852 Koropok C1 Oct. 16, 2019, 3:51 p.m. OK MS C++ 2017 TESTS 41 46 102400 1600
62709974 EgorShibaev C1 Oct. 16, 2019, 3:34 p.m. OK MS C++ 2017 TESTS 41 46 102400 1600
62737040 PAG C1 Oct. 16, 2019, 6:38 p.m. OK PascalABC.NET TESTS 41 389 1126400 1600
62732264 rsFalse C1 Oct. 16, 2019, 5:04 p.m. OK Perl TESTS 41 46 1228800 1600
62724161 kabeer27 C1 Oct. 16, 2019, 4:30 p.m. OK PyPy 2 TESTS 41 156 2457600 1600
62726887 raj1307 C1 Oct. 16, 2019, 4:42 p.m. OK PyPy 2 TESTS 41 187 3584000 1600
62755150 MVP C1 Oct. 17, 2019, 4:09 a.m. OK PyPy 2 TESTS 41 233 2969600 1600
62768020 raj1307 C1 Oct. 17, 2019, 9:18 a.m. OK PyPy 2 TESTS 41 249 3481600 1600
67166885 soumyasarkar1998 C1 Dec. 18, 2019, 3:52 p.m. OK PyPy 2 TESTS 41 249 3584000 1600
62719788 aeternalis1 C1 Oct. 16, 2019, 4:11 p.m. OK PyPy 2 TESTS 41 264 3584000 1600
62713094 pa.n.ik C1 Oct. 16, 2019, 3:44 p.m. OK PyPy 2 TESTS 41 264 8294400 1600
62925857 iamprayush C1 Oct. 19, 2019, 11:19 a.m. OK PyPy 2 TESTS 41 295 6041600 1600
62707726 zaceleiseliakai C1 Oct. 16, 2019, 3:26 p.m. OK PyPy 2 TESTS 41 342 3686400 1600
62731519 MVP C1 Oct. 16, 2019, 5:02 p.m. OK PyPy 2 TESTS 41 421 3481600 1600
62711057 jakethekoenig C1 Oct. 16, 2019, 3:37 p.m. OK PyPy 3 TESTS 41 186 3276800 1600
62946702 nikeshthapa255 C1 Oct. 19, 2019, 5:37 p.m. OK PyPy 3 TESTS 41 186 4403200 1600
62705889 Kiri8128 C1 Oct. 16, 2019, 3:21 p.m. OK PyPy 3 TESTS 41 187 3788800 1600
67982599 erickjohnross C1 Dec. 30, 2019, 8:09 p.m. OK PyPy 3 TESTS 41 202 3686400 1600
62724465 vinuthegr8 C1 Oct. 16, 2019, 4:32 p.m. OK PyPy 3 TESTS 41 202 4300800 1600
62712963 shiv1470 C1 Oct. 16, 2019, 3:44 p.m. OK PyPy 3 TESTS 41 202 4608000 1600
62717085 pineriver C1 Oct. 16, 2019, 4 p.m. OK PyPy 3 TESTS 41 218 4403200 1600
63195103 codershuvo C1 Oct. 22, 2019, 6:20 p.m. OK PyPy 3 TESTS 41 233 5427200 1600
62960765 jklcrek C1 Oct. 20, 2019, 12:15 a.m. OK PyPy 3 TESTS 41 233 5632000 1600
62756370 uddeshya.singh C1 Oct. 17, 2019, 4:55 a.m. OK PyPy 3 TESTS 41 234 5939200 1600
62708283 nwi C1 Oct. 16, 2019, 3:28 p.m. OK Python 2 TESTS 41 202 409600 1600
64718870 n0body9200 C1 Nov. 12, 2019, 1:36 a.m. OK Python 3 TESTS 41 109 1024000 1600
62829117 FlyingBag65 C1 Oct. 17, 2019, 7:06 p.m. OK Python 3 TESTS 41 124 819200 1600
62727438 Jozik C1 Oct. 16, 2019, 4:45 p.m. OK Python 3 TESTS 41 124 819200 1600
62718909 _sujm C1 Oct. 16, 2019, 4:07 p.m. OK Python 3 TESTS 41 124 819200 1600
66772472 _tool_ C1 Dec. 13, 2019, 8:28 a.m. OK Python 3 TESTS 41 124 1024000 1600
63121734 razor94_ C1 Oct. 22, 2019, 11:30 a.m. OK Python 3 TESTS 41 124 1024000 1600
62708776 Dart-Xeyter C1 Oct. 16, 2019, 3:30 p.m. OK Python 3 TESTS 41 140 819200 1600
62767173 Code_Bear C1 Oct. 17, 2019, 9:02 a.m. OK Python 3 TESTS 41 140 1228800 1600
62751980 Coki628 C1 Oct. 17, 2019, 2:02 a.m. OK Python 3 TESTS 41 140 1433600 1600
62731011 Ivan_Tea C1 Oct. 16, 2019, 5 p.m. OK Python 3 TESTS 41 155 1228800 1600
62716180 super_hook_girl_lover C1 Oct. 16, 2019, 3:56 p.m. OK Ruby TESTS 41 311 102400 1600
63557914 ikazuya0201 C1 Oct. 27, 2019, 1:24 p.m. OK Rust TESTS 41 31 204800 1600
67968265 gearjack C1 Dec. 30, 2019, 2:05 p.m. OK Rust TESTS 41 31 409600 1600
63434663 gu_castle C1 Oct. 26, 2019, 10:15 a.m. OK Rust TESTS 41 46 102400 1600
67476252 manta1130 C1 Dec. 23, 2019, 2:27 p.m. OK Rust TESTS 41 62 102400 1600

remove filters

Back to search problems