Codeforces Round 647 (Div. 1) - Thanks, Algo Muse!

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
1361 Codeforces Round 647 (Div. 1) - Thanks, Algo Muse! FINISHED False 9000 146071511 June 4, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1668 ) C Johnny and Megan's Necklace PROGRAMMING binary search bitmasks constructive algorithms dfs and similar ds graphs 2500

B'Johnny 's younger sister Megan had a birthday recently. Her brother has bought her a box signed as "Your beautiful necklace -- do it yourself!". It contains many necklace parts and some magic glue. The necklace part is a chain connecting two pearls. Color of each pearl can be defined by a non-negative integer. The magic glue allows Megan to merge two pearls (possibly from the same necklace part) into one. The beauty of a connection of pearls in colors u and v is defined as follows: let 2^k be the greatest power of two dividing u oplus v -- exclusive or of u and v . Then the beauty equals k . If u = v , you may assume that beauty is equal to 20 . Each pearl can be combined with another at most once. Merging two parts of a necklace connects them. Using the glue multiple times, Megan can finally build the necklace, which is a cycle made from connected necklace parts (so every pearl in the necklace is combined with precisely one other pearl in it). The beauty of such a necklace is the minimum beauty of a single connection in it. The girl wants to use all available necklace parts to build exactly one necklace consisting of all of them with the largest possible beauty. Help her! The first line contains n (1 <= q n <= q 5 cdot 10^5) -- the number of necklace parts in the box. Each of the next n lines contains two integers a and b (0 <= q a, b < 2^{20}) , which denote colors of pearls presented in the necklace parts. Pearls in the i -th line have indices 2i - 1 and 2i respectively. The first line should contain a single integer b denoting the maximum possible beauty of a necklace built from all given parts. The following line should contain 2n distinct integers p_i (1 <= q p_i <= q 2n) -- the indices of initial pearls in the order in which they appear on a cycle. Indices of pearls belonging to the same necklace part have to appear'...

Tutorials

Codeforces Round #647 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
82529440 Gassa C June 4, 2020, 3:39 p.m. OK D TESTS 210 2012 115404800 2500
82584992 cjy2003 C June 5, 2020, 1 a.m. OK GNU C++11 TESTS 210 311 45363200 2500
82605419 yasugongshang C June 5, 2020, 7:08 a.m. OK GNU C++11 TESTS 210 327 53964800 2500
82584707 ddytxdy C June 5, 2020, 12:52 a.m. OK GNU C++11 TESTS 210 358 130560000 2500
82586725 mlby C June 5, 2020, 1:54 a.m. OK GNU C++11 TESTS 210 404 88166400 2500
82741851 AutumnKite C June 7, 2020, 12:06 a.m. OK GNU C++11 TESTS 210 451 77516800 2500
82583181 Frame233 C June 4, 2020, 11:56 p.m. OK GNU C++11 TESTS 210 452 110694400 2500
82609235 AutumnKite C June 5, 2020, 7:55 a.m. OK GNU C++11 TESTS 210 468 77312000 2500
82544579 suncongbo C June 4, 2020, 4:16 p.m. OK GNU C++11 TESTS 210 468 127385600 2500
83300925 Noire02 C June 10, 2020, 12:53 p.m. OK GNU C++11 TESTS 210 483 46284800 2500
82546078 namespace_std C June 4, 2020, 4:20 p.m. OK GNU C++11 TESTS 210 483 105984000 2500
82586526 beginend C June 5, 2020, 1:48 a.m. OK GNU C++14 TESTS 210 530 54579200 2500
82691933 wangziji C June 6, 2020, 9:34 a.m. OK GNU C++14 TESTS 210 530 84684800 2500
82703596 wangziji C June 6, 2020, 12:26 p.m. OK GNU C++14 TESTS 210 545 80281600 2500
82593280 777777777Plus C June 5, 2020, 4:15 a.m. OK GNU C++14 TESTS 210 607 58880000 2500
82550704 QAQmika C June 4, 2020, 4:33 p.m. OK GNU C++14 TESTS 210 670 104140800 2500
82577708 _no0B C June 4, 2020, 8:46 p.m. OK GNU C++14 TESTS 210 748 37785600 2500
82545246 Chelly C June 4, 2020, 4:18 p.m. OK GNU C++14 TESTS 210 748 137216000 2500
82626704 zhouzhendong C June 5, 2020, 11:39 a.m. OK GNU C++14 TESTS 210 779 88985600 2500
82537544 Plurm C June 4, 2020, 3:58 p.m. OK GNU C++14 TESTS 210 841 101273600 2500
82567516 wangziji C June 4, 2020, 6:27 p.m. OK GNU C++14 TESTS 210 842 71475200 2500
82583237 cnjzxy C June 4, 2020, 11:58 p.m. OK GNU C++17 TESTS 210 545 79155200 2500
82583291 cnjzxy C June 5, 2020, midnight OK GNU C++17 TESTS 210 546 77004800 2500
82603286 CMXRYNP C June 5, 2020, 6:42 a.m. OK GNU C++17 TESTS 210 561 49152000 2500
82616426 penguin1017 C June 5, 2020, 9:22 a.m. OK GNU C++17 TESTS 210 561 88166400 2500
82677457 cxaphoenix C June 6, 2020, 5:52 a.m. OK GNU C++17 TESTS 210 576 70758400 2500
82845604 Magicdog_Jo C June 7, 2020, 3:57 p.m. OK GNU C++17 TESTS 210 576 171520000 2500
83512062 gyz_gyz C June 12, 2020, 8:28 a.m. OK GNU C++17 TESTS 210 592 106393600 2500
82670451 lqs2015 C June 6, 2020, 3:07 a.m. OK GNU C++17 TESTS 210 607 36966400 2500
82534224 9baka_Cirno C June 4, 2020, 3:50 p.m. OK GNU C++17 TESTS 210 623 104448000 2500
82568973 Rafbill C June 4, 2020, 6:37 p.m. OK GNU C++17 TESTS 210 639 31744000 2500
82547240 KADR C June 4, 2020, 4:23 p.m. OK GNU C++17 (64) TESTS 210 404 51302400 2500
82542005 Suika_predator C June 4, 2020, 4:10 p.m. OK GNU C++17 (64) TESTS 210 577 92569600 2500
82739974 sammyMaX C June 6, 2020, 10:25 p.m. OK GNU C++17 (64) TESTS 210 592 36761600 2500
82567726 TimonKnigge C June 4, 2020, 6:28 p.m. OK GNU C++17 (64) TESTS 210 608 101376000 2500
82529045 nuip C June 4, 2020, 3:38 p.m. OK GNU C++17 (64) TESTS 210 624 91033600 2500
82710450 zjsdut C June 6, 2020, 1:58 p.m. OK GNU C++17 (64) TESTS 210 639 105267200 2500
82710282 zjsdut C June 6, 2020, 1:56 p.m. OK GNU C++17 (64) TESTS 210 639 107622400 2500
82544668 hitonanode C June 4, 2020, 4:17 p.m. OK GNU C++17 (64) TESTS 210 654 87040000 2500
82531763 teapotd C June 4, 2020, 3:44 p.m. OK GNU C++17 (64) TESTS 210 670 108032000 2500
82596080 uruuru8888 C June 5, 2020, 5:04 a.m. OK GNU C++17 (64) TESTS 210 670 139776000 2500
82527597 uwi C June 4, 2020, 3:35 p.m. OK Java 11 TESTS 210 1871 256307200 2500
82584727 Lewin C June 5, 2020, 12:52 a.m. OK Java 11 TESTS 210 2573 125849600 2500
82603852 PizzaLovers007 C June 5, 2020, 6:49 a.m. OK Java 11 TESTS 210 2730 477593600 2500
82606310 PizzaLovers007 C June 5, 2020, 7:20 a.m. OK Java 11 TESTS 210 2932 491315200 2500
82532970 cwise C June 4, 2020, 3:47 p.m. OK Java 8 TESTS 210 716 77414400 2500
82579845 qwerty787788 C June 4, 2020, 9:42 p.m. OK Java 8 TESTS 210 2089 206950400 2500
82596855 ahmadhoumani C June 5, 2020, 5:17 a.m. OK Java 8 TESTS 210 2542 237465600 2500
82543839 DarLam C June 4, 2020, 4:14 p.m. OK Java 8 TESTS 210 2698 237465600 2500
82588856 SecondThread C June 5, 2020, 2:50 a.m. OK Java 8 TESTS 210 2900 276275200 2500
82562400 Oopsimbad C June 4, 2020, 5:04 p.m. OK Java 8 TESTS 210 2948 318464000 2500
82730529 polyakoff C June 6, 2020, 6:29 p.m. OK Java 8 TESTS 210 2994 215142400 2500
82586807 Hakiobo C June 5, 2020, 1:56 a.m. OK Kotlin TESTS 210 592 43110400 2500
82571471 elizarov C June 4, 2020, 7:03 p.m. OK Kotlin TESTS 210 670 39936000 2500
82614152 Spheniscine C June 5, 2020, 8:54 a.m. OK Kotlin TESTS 210 779 98201600 2500
82587258 Hakiobo C June 5, 2020, 2:09 a.m. OK Kotlin TESTS 210 811 102604800 2500
82612901 Spheniscine C June 5, 2020, 8:38 a.m. OK Kotlin TESTS 210 1060 76697600 2500
82611986 Spheniscine C June 5, 2020, 8:27 a.m. OK Kotlin TESTS 210 1076 76800000 2500
82610885 Spheniscine C June 5, 2020, 8:15 a.m. OK Kotlin TESTS 210 1621 180121600 2500
82584294 Hakiobo C June 5, 2020, 12:38 a.m. OK Kotlin TESTS 210 2526 226713600 2500
82583902 Hakiobo C June 5, 2020, 12:25 a.m. OK Kotlin TESTS 210 2698 226713600 2500
82583162 Hakiobo C June 4, 2020, 11:55 p.m. OK Kotlin TESTS 210 2776 226304000 2500
82544368 keymoon C June 4, 2020, 4:16 p.m. OK Mono C# TESTS 210 2293 157696000 2500
82561570 lxhgww C June 4, 2020, 5:02 p.m. OK MS C++ TESTS 210 1076 150425600 2500
82688087 tarattata1 C June 6, 2020, 8:32 a.m. OK MS C++ 2017 TESTS 210 1154 94105600 2500
82555157 Vedensky C June 4, 2020, 4:46 p.m. OK MS C++ 2017 TESTS 210 1216 70860800 2500
82561573 alex_36 C June 4, 2020, 5:02 p.m. OK MS C++ 2017 TESTS 210 2027 48128000 2500
82687649 tarattata1 C June 6, 2020, 8:25 a.m. OK MS C++ 2017 TESTS 210 2027 96153600 2500
82668528 pajenegod C June 6, 2020, 2 a.m. OK PyPy 2 TESTS 210 2916 261120000 2500
82583550 cnjzxy C June 5, 2020, 12:12 a.m. OK Rust TESTS 210 421 53964800 2500
82556150 EbTech C June 4, 2020, 4:49 p.m. OK Rust TESTS 210 436 53964800 2500
82603997 sansen C June 5, 2020, 6:50 a.m. OK Rust TESTS 210 545 69836800 2500
82673442 user202729_ C June 6, 2020, 4:29 a.m. OK Rust TESTS 210 997 43827200 2500
82624075 lucifer1004 C June 5, 2020, 11:04 a.m. OK Rust TESTS 210 1232 63180800 2500
82542170 sansen C June 4, 2020, 4:10 p.m. OK Rust TESTS 210 1716 68096000 2500

remove filters

Back to search problems