Codeforces Global Round 3

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
1148 Codeforces Global Round 3 FINISHED False 8100 172423499 June 1, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5001 ) D Dirty Deeds Done Dirt Cheap PROGRAMMING greedy sortings 1800

B"You are given n pairs of integers (a_1, b_1), (a_2, b_2), ldots, (a_n, b_n) . All of the integers in the pairs are distinct and are in the range from 1 to 2 cdot n inclusive. Let's call a sequence of integers x_1, x_2, ldots, x_{2k} good if either You need to choose a subset of distinct indices i_1, i_2, ldots, i_t and their order in a way that if you write down all numbers from the pairs in a single sequence (the sequence would be a_{i_1}, b_{i_1}, a_{i_2}, b_{i_2}, ldots, a_{i_t}, b_{i_t} ), this sequence is good. What is the largest subset of indices you can choose? You also need to construct the corresponding index sequence i_1, i_2, ldots, i_t . The first line contains single integer n ( 2 <= q n <= q 3 cdot 10^5 ) -- the number of pairs. Each of the next n lines contain two numbers -- a_i and b_i ( 1 <= a_i, b_i <= 2 cdot n ) -- the elements of the pairs. It is guaranteed that all integers in the pairs are distinct, that is, every integer from 1 to 2 cdot n is mentioned exactly once. In the first line print a single integer t -- the number of pairs in the answer. Then print t distinct integers i_1, i_2, ldots, i_t -- the indexes of pairs in the corresponding order. The final sequence in the first example is 1 < 7 > 3 < 5 > 2 < 10 . The final sequence in the second example is 6 > 1 < 3 > 2 < 5 > 4 . "...

Tutorials

Codeforces Global Round 3 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55018369 jiangly D June 3, 2019, 1:30 p.m. OK Clang++17 Diagnostics TESTS 48 701 4505600 1800
54940476 avm D June 1, 2019, 4:16 p.m. OK D TESTS 48 265 25292800 1800
54933498 Gassa D June 1, 2019, 3:40 p.m. OK D TESTS 48 312 16076800 1800
54935288 iica D June 1, 2019, 3:49 p.m. OK D TESTS 48 374 36352000 1800
55188908 Denor D June 6, 2019, 5:31 a.m. OK Delphi TESTS 48 217 9728000 1800
54950984 ruban D June 1, 2019, 7:11 p.m. OK Delphi TESTS 48 389 81817600 1800
55661849 rainboy D June 16, 2019, 10:02 p.m. OK GNU C11 TESTS 48 1123 3584000 1800
55561024 ktk54x D June 14, 2019, 12:40 p.m. OK GNU C11 TESTS 48 1138 7168000 1800
55055264 about D June 3, 2019, 6:43 p.m. OK GNU C11 TESTS 48 1169 9830400 1800
54931279 LJC00118 D June 1, 2019, 3:30 p.m. OK GNU C++11 TESTS 48 62 6041600 1800
54967640 ChthollyNotaSeniorious D June 2, 2019, 7:08 a.m. OK GNU C++11 TESTS 48 62 9420800 1800
59649273 chenyewei_1234 D Aug. 29, 2019, 7:27 a.m. OK GNU C++11 TESTS 48 77 8396800 1800
55610339 ReaLNero1 D June 16, 2019, 5:16 a.m. OK GNU C++11 TESTS 48 77 9523200 1800
54929399 Umi D June 1, 2019, 3:21 p.m. OK GNU C++11 TESTS 48 78 5529600 1800
54958914 maomao330 D June 2, 2019, 2:23 a.m. OK GNU C++11 TESTS 48 93 3584000 1800
54940208 528hby D June 1, 2019, 4:14 p.m. OK GNU C++11 TESTS 48 93 6041600 1800
55069159 Frame233 D June 4, 2019, 5:26 a.m. OK GNU C++11 TESTS 48 93 7065600 1800
55197195 newbiechdboom0 D June 6, 2019, 9:01 a.m. OK GNU C++11 TESTS 48 93 8089600 1800
60073520 1910903 D Sept. 5, 2019, 11:54 a.m. OK GNU C++11 TESTS 48 93 12595200 1800
54928523 wleung_bvg D June 1, 2019, 3:17 p.m. OK GNU C++14 TESTS 48 77 9625600 1800
57853050 vishnu_m D July 27, 2019, 1:55 p.m. OK GNU C++14 TESTS 48 109 2355200 1800
54939168 Hasan0540 D June 1, 2019, 4:09 p.m. OK GNU C++14 TESTS 48 171 5632000 1800
54963136 OnionPringles D June 2, 2019, 5:01 a.m. OK GNU C++14 TESTS 48 171 5632000 1800
55112111 scientificuber D June 5, 2019, 6:50 a.m. OK GNU C++14 TESTS 48 171 6348800 1800
54928543 131131yhx D June 1, 2019, 3:17 p.m. OK GNU C++14 TESTS 48 171 12083200 1800
55086861 boycute D June 4, 2019, 12:53 p.m. OK GNU C++14 TESTS 48 186 6348800 1800
54936120 pinebananais D June 1, 2019, 3:54 p.m. OK GNU C++14 TESTS 48 186 6348800 1800
54954491 Jubair_2147483647 D June 1, 2019, 9:25 p.m. OK GNU C++14 TESTS 48 186 6656000 1800
54972173 bhargav_0085 D June 2, 2019, 9:05 a.m. OK GNU C++14 TESTS 48 186 9523200 1800
54932084 lesskreker D June 1, 2019, 3:34 p.m. OK GNU C++17 TESTS 48 93 9625600 1800
54928611 interestingLSY D June 1, 2019, 3:18 p.m. OK GNU C++17 TESTS 48 108 8499200 1800
54940052 whzzt D June 1, 2019, 4:14 p.m. OK GNU C++17 TESTS 48 155 26316800 1800
57019098 qrfkickit D July 14, 2019, 1:06 p.m. OK GNU C++17 TESTS 48 171 6348800 1800
54976173 cwhao D June 2, 2019, 10:56 a.m. OK GNU C++17 TESTS 48 171 24064000 1800
54972397 __4444x__ D June 2, 2019, 9:10 a.m. OK GNU C++17 TESTS 48 186 4812800 1800
54930079 TrivialMan D June 1, 2019, 3:24 p.m. OK GNU C++17 TESTS 48 186 6041600 1800
55004715 mashiron D June 3, 2019, 6:53 a.m. OK GNU C++17 TESTS 48 186 6348800 1800
65415868 Kallaf D Nov. 20, 2019, 6:50 a.m. OK GNU C++17 TESTS 48 186 6348800 1800
55587237 KoalaMuch D June 15, 2019, 10:16 a.m. OK GNU C++17 TESTS 48 186 6348800 1800
54944657 caidodo0_0 D June 1, 2019, 4:38 p.m. OK Go TESTS 48 561 14233600 1800
68740032 YahiaMostafa D Jan. 13, 2020, 11:51 p.m. OK Java 11 TESTS 48 919 15155200 1800
54944168 amolpratap007 D June 1, 2019, 4:35 p.m. OK Java 8 TESTS 48 264 307200 1800
54965231 rahsutamrev D June 2, 2019, 6:07 a.m. OK Java 8 TESTS 48 280 8601600 1800
54989691 SrapZark D June 2, 2019, 5:53 p.m. OK Java 8 TESTS 48 311 2867200 1800
54944580 vaibhavpulastya D June 1, 2019, 4:37 p.m. OK Java 8 TESTS 48 311 2969600 1800
55017532 SrapZark D June 3, 2019, 1:06 p.m. OK Java 8 TESTS 48 311 3174400 1800
54929307 Harpae D June 1, 2019, 3:21 p.m. OK Java 8 TESTS 48 311 3276800 1800
54940343 Sharon D June 1, 2019, 4:15 p.m. OK Java 8 TESTS 48 326 3276800 1800
55017506 SrapZark D June 3, 2019, 1:05 p.m. OK Java 8 TESTS 48 327 3072000 1800
54989759 SrapZark D June 2, 2019, 5:55 p.m. OK Java 8 TESTS 48 327 3481600 1800
54938760 Yugioh D June 1, 2019, 4:07 p.m. OK Java 8 TESTS 48 327 3481600 1800
54944934 Lishy2010 D June 1, 2019, 4:39 p.m. OK Kotlin TESTS 48 451 19558400 1800
64674664 Spheniscine D Nov. 11, 2019, 7:32 a.m. OK Kotlin TESTS 48 560 19763200 1800
54956684 duckladydinh D June 2, 2019, 12:02 a.m. OK Kotlin TESTS 48 638 33792000 1800
55087573 viajero D June 4, 2019, 1:10 p.m. OK Kotlin TESTS 48 826 19558400 1800
54929830 alexey.enkov D June 1, 2019, 3:23 p.m. OK Kotlin TESTS 48 857 12083200 1800
55190854 xxx_alisher_xxx D June 6, 2019, 6:24 a.m. OK Kotlin TESTS 48 1013 48640000 1800
54988616 daniilzimin4 D June 2, 2019, 5:12 p.m. OK Kotlin TESTS 48 1060 36249600 1800
54946296 Protagoras D June 1, 2019, 4:45 p.m. OK Kotlin TESTS 48 1076 35225600 1800
54942154 Denzed D June 1, 2019, 4:25 p.m. OK Kotlin TESTS 48 1153 37273600 1800
54935786 chokudai D June 1, 2019, 3:52 p.m. OK Mono C# TESTS 48 499 27443200 1800
54944569 omikad D June 1, 2019, 4:37 p.m. OK Mono C# TESTS 48 561 35840000 1800
54938862 LateRest D June 1, 2019, 4:08 p.m. OK Mono C# TESTS 48 623 93696000 1800
54935814 kuuso D June 1, 2019, 3:52 p.m. OK Mono C# TESTS 48 655 37376000 1800
54932441 keymoon D June 1, 2019, 3:35 p.m. OK Mono C# TESTS 48 717 42496000 1800
54934500 eki D June 1, 2019, 3:45 p.m. OK Mono C# TESTS 48 1434 28160000 1800
60094404 vjudge4 D Sept. 5, 2019, 3:02 p.m. OK MS C++ TESTS 48 171 4812800 1800
60437029 vjudge3 D Sept. 12, 2019, 11:07 a.m. OK MS C++ TESTS 48 202 72192000 1800
54932619 math957963 D June 1, 2019, 3:36 p.m. OK MS C++ TESTS 48 217 7168000 1800
56655768 nuchenghao D July 7, 2019, 8:37 a.m. OK MS C++ TESTS 48 607 10854400 1800
55053859 abhishek_1 D June 3, 2019, 6:12 p.m. OK MS C++ TESTS 48 904 4710400 1800
55010838 ItsNikolor D June 3, 2019, 9:57 a.m. OK MS C++ 2017 TESTS 48 248 7680000 1800
55318010 zzq233 D June 9, 2019, 1:13 a.m. OK MS C++ 2017 TESTS 48 249 7270400 1800
54975638 RANCAFE D June 2, 2019, 10:40 a.m. OK MS C++ 2017 TESTS 48 249 7270400 1800
68631136 AleksanderBalobanov D Jan. 12, 2020, 2:53 a.m. OK MS C++ 2017 TESTS 48 264 5734400 1800
57968042 ZSTU-2018329621261 D July 30, 2019, 4 a.m. OK MS C++ 2017 TESTS 48 264 7270400 1800
54934920 dkyun D June 1, 2019, 3:47 p.m. OK MS C++ 2017 TESTS 48 265 5734400 1800
62318928 ainch96 D Oct. 10, 2019, 4:06 p.m. OK MS C++ 2017 TESTS 48 265 14438400 1800
60075085 vjudge1 D Sept. 5, 2019, 12:22 p.m. OK MS C++ 2017 TESTS 48 265 24064000 1800
54935901 youx D June 1, 2019, 3:52 p.m. OK MS C++ 2017 TESTS 48 280 8192000 1800
55075214 Lordxx D June 4, 2019, 8:16 a.m. OK MS C++ 2017 TESTS 48 483 12083200 1800
54939056 CyberGoose D June 1, 2019, 4:09 p.m. OK Ocaml TESTS 48 452 19046400 1800
54933350 pajenegod D June 1, 2019, 3:40 p.m. OK PyPy 2 TESTS 48 623 40140800 1800
56148349 raj1307 D June 27, 2019, 7:15 a.m. OK PyPy 2 TESTS 48 810 28262400 1800
54947513 c1729 D June 1, 2019, 4:49 p.m. OK PyPy 2 TESTS 48 1638 58675200 1800
54961648 apoorv1999 D June 2, 2019, 4:09 a.m. OK PyPy 2 TESTS 48 1700 22016000 1800
54964261 shehebe D June 2, 2019, 5:36 a.m. OK PyPy 2 TESTS 48 2308 62054400 1800
54964332 shehebe D June 2, 2019, 5:39 a.m. OK PyPy 2 TESTS 48 2324 62054400 1800
54964176 shehebe D June 2, 2019, 5:33 a.m. OK PyPy 2 TESTS 48 2340 57446400 1800
54964399 shehebe D June 2, 2019, 5:41 a.m. OK PyPy 2 TESTS 48 2448 73011200 1800
54931558 exoji2e D June 1, 2019, 3:31 p.m. OK PyPy 2 TESTS 48 2573 74035200 1800
54964477 shehebe D June 2, 2019, 5:43 a.m. OK PyPy 2 TESTS 48 2713 50483200 1800
55670515 sdhd D June 17, 2019, 7:17 a.m. OK PyPy 3 TESTS 48 1045 60108800 1800
55267714 Bovniova D June 7, 2019, 2:48 p.m. OK PyPy 3 TESTS 48 1138 60313600 1800
54934679 Kiri8128 D June 1, 2019, 3:46 p.m. OK PyPy 3 TESTS 48 1294 50380800 1800
54954798 mylyanyk.ivan D June 1, 2019, 9:42 p.m. OK PyPy 3 TESTS 48 1294 70758400 1800
54934885 whatshisbucket D June 1, 2019, 3:47 p.m. OK PyPy 3 TESTS 48 1341 57139200 1800
58567986 StinsonOvO D Aug. 11, 2019, 8:48 a.m. OK PyPy 3 TESTS 48 1450 52224000 1800
56410653 shyman D July 1, 2019, 11:24 p.m. OK PyPy 3 TESTS 48 1497 61337600 1800
54956373 Praxis D June 1, 2019, 11:33 p.m. OK PyPy 3 TESTS 48 1794 61952000 1800
54985373 Paixao D June 2, 2019, 3:23 p.m. OK PyPy 3 TESTS 48 1840 30105600 1800
54949252 _oshhh_ D June 1, 2019, 6:40 p.m. OK PyPy 3 TESTS 48 1918 67174400 1800
54933657 nwi D June 1, 2019, 3:41 p.m. OK Python 2 TESTS 48 967 45875200 1800
69877776 soumyasarkar1998 D Jan. 31, 2020, 5 a.m. OK Python 2 TESTS 48 1216 24780800 1800
54946185 SoSooding D June 1, 2019, 4:45 p.m. OK Python 2 TESTS 48 1778 56934400 1800
54938485 foreverdiv3 D June 1, 2019, 4:06 p.m. OK Python 2 TESTS 48 1981 53350400 1800
55123460 cauchyg D June 5, 2019, 11:47 a.m. OK Python 2 TESTS 48 2058 49971200 1800
55109880 Bin4ryGh0st D June 5, 2019, 5:37 a.m. OK Python 3 TESTS 48 982 52531200 1800
54929740 iehn D June 1, 2019, 3:23 p.m. OK Python 3 TESTS 48 1122 64204800 1800
54938099 eminecula D June 1, 2019, 4:03 p.m. OK Python 3 TESTS 48 1232 48742400 1800
54931346 tieros D June 1, 2019, 3:30 p.m. OK Python 3 TESTS 48 1263 55500800 1800
64617519 MinecraftFuns D Nov. 10, 2019, 5:33 a.m. OK Python 3 TESTS 48 1309 48332800 1800
55235082 Mint_Dentifrice D June 7, 2019, 7:57 a.m. OK Python 3 TESTS 48 1340 49254400 1800
54954833 mylyanyk.ivan D June 1, 2019, 9:44 p.m. OK Python 3 TESTS 48 1357 57241600 1800
56606405 codershuvo D July 6, 2019, 4:57 a.m. OK Python 3 TESTS 48 1372 70451200 1800
54934381 ngs_436 D June 1, 2019, 3:45 p.m. OK Python 3 TESTS 48 1450 33382400 1800
54946832 tiagoshibata D June 1, 2019, 4:47 p.m. OK Python 3 TESTS 48 1466 55500800 1800
54949453 EbTech D June 1, 2019, 6:42 p.m. OK Rust TESTS 48 218 6348800 1800
54951330 limed D June 1, 2019, 7:20 p.m. OK Scala TESTS 48 1045 21811200 1800

remove filters

Back to search problems