Codeforces Round 633 (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
1338 Codeforces Round 633 (Div. 1) FINISHED False 7200 150652511 April 12, 2020, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8568 ) B Edge Weight Assignment PROGRAMMING bitmasks constructive algorithms greedy math trees

B"You have unweighted tree of n vertices. You have to assign a positive weight to each edge so that the following condition would hold: Note that you can put very large positive integers (like 10^{(10^{10})} ). It's guaranteed that such assignment always exists under given constraints. Now let's define f as the number of distinct weights in assignment. In this example, assignment is invalid, because bitwise XOR of all edge weights between vertex 1 and vertex 6 ( 3, 4, 5, 4 ) is not 0 . What are the minimum and the maximum possible values of f for the given tree? Find and print both. The first line contains integer n ( 3 <= n <= 10^{5} ) -- the number of vertices in given tree. The i -th of the next n-1 lines contains two integers a_{i} and b_{i} ( 1 <= a_{i} lt b_{i} <= n ) -- it means there is an edge between a_{i} and b_{i} . It is guaranteed that given graph forms tree of n vertices. Print two integers -- the minimum and maximum possible value of f can be made from valid assignment of given tree. Note that it's always possible to make an assignment under given constraints. In the first example, possible assignments for each minimum and maximum are described in picture below. Of course, there are multiple possible assignments for each minimum and maximum. In the second example, possible assignments for each minimum and maximum are described in picture below. The f value of valid assignment of this tree is always 3 . In the third example, possible assignments for each minimum and maximum are described in picture below. Of course, there are multiple possible assignments for each minimum and maximum. "...

Tutorials

Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
76351268 Gassa B April 12, 2020, 2:27 p.m. OK D TESTS 32 109 17715200
76346921 hos.lyric B April 12, 2020, 2:21 p.m. OK D TESTS 32 140 17408000
76359232 physics0523 B April 12, 2020, 2:37 p.m. OK GNU C11 TESTS 32 93 18841600
76387514 pengin_2000 B April 12, 2020, 3:28 p.m. OK GNU C11 TESTS 32 124 5222400
76384519 luotc_why B April 12, 2020, 3:22 p.m. OK GNU C++11 TESTS 32 31 4198400
76368751 pufanyi B April 12, 2020, 2:52 p.m. OK GNU C++11 TESTS 32 31 4505600
76444140 pufanyi B April 13, 2020, 3:08 a.m. OK GNU C++11 TESTS 32 31 4505600
76360878 froggyzhang B April 12, 2020, 2:40 p.m. OK GNU C++11 TESTS 32 31 6451200
76440714 QwQcOrZ B April 13, 2020, 1:43 a.m. OK GNU C++11 TESTS 32 31 7168000
76372685 BZZB B April 12, 2020, 2:58 p.m. OK GNU C++11 TESTS 32 31 7884800
76359549 disposrestfulIy B April 12, 2020, 2:38 p.m. OK GNU C++11 TESTS 32 31 15872000
76438516 AristocratMarser B April 13, 2020, 12:40 a.m. OK GNU C++11 TESTS 32 46 5734400
76447830 gyh20 B April 13, 2020, 4:22 a.m. OK GNU C++11 TESTS 32 46 5734400
76389864 z7z_Eta B April 12, 2020, 3:34 p.m. OK GNU C++11 TESTS 32 46 6246400
76442887 peter112358 B April 13, 2020, 2:39 a.m. OK GNU C++14 TESTS 32 77 5734400
76446250 firiexp B April 13, 2020, 3:52 a.m. OK GNU C++14 TESTS 32 77 6144000
76410626 W_Marlin B April 12, 2020, 5:20 p.m. OK GNU C++14 TESTS 32 77 7782400
76346494 wucstdio B April 12, 2020, 2:21 p.m. OK GNU C++14 TESTS 32 77 7884800
76359392 Linkus B April 12, 2020, 2:37 p.m. OK GNU C++14 TESTS 32 77 8601600
76361179 MediationalField B April 12, 2020, 2:40 p.m. OK GNU C++14 TESTS 32 77 9216000
76361348 RobeZH B April 12, 2020, 2:40 p.m. OK GNU C++14 TESTS 32 77 9728000
76445785 bao_do B April 13, 2020, 3:43 a.m. OK GNU C++14 TESTS 32 77 9830400
76400849 fragusbot B April 12, 2020, 3:59 p.m. OK GNU C++14 TESTS 32 78 4505600
76440423 njwrz B April 13, 2020, 1:35 a.m. OK GNU C++14 TESTS 32 78 4915200
76364091 LayCurse B April 12, 2020, 2:44 p.m. OK GNU C++17 TESTS 32 46 99942400
76367705 Changyu B April 12, 2020, 2:50 p.m. OK GNU C++17 TESTS 32 62 7475200
76437687 xiahongyu B April 13, 2020, 12:15 a.m. OK GNU C++17 TESTS 32 62 7475200
76442994 nickluo B April 13, 2020, 2:41 a.m. OK GNU C++17 TESTS 32 62 9728000
76437673 _andyli B April 13, 2020, 12:15 a.m. OK GNU C++17 TESTS 32 62 13824000
76371534 Huah B April 12, 2020, 2:56 p.m. OK GNU C++17 TESTS 32 77 6451200
76364601 kessido B April 12, 2020, 2:45 p.m. OK GNU C++17 TESTS 32 77 6553600
76365024 sys. B April 12, 2020, 2:46 p.m. OK GNU C++17 TESTS 32 77 6860800
76346495 Hazyknight B April 12, 2020, 2:21 p.m. OK GNU C++17 TESTS 32 77 7065600
76443801 yangyuchen B April 13, 2020, 3 a.m. OK GNU C++17 TESTS 32 77 7782400
76343621 ksun48 B April 12, 2020, 2:18 p.m. OK GNU C++17 (64) TESTS 32 62 5120000
76376325 lkosten B April 12, 2020, 3:05 p.m. OK GNU C++17 (64) TESTS 32 77 6348800
76412355 ivan100sic B April 12, 2020, 5:34 p.m. OK GNU C++17 (64) TESTS 32 77 11366400
76436950 balbit B April 12, 2020, 11:53 p.m. OK GNU C++17 (64) TESTS 32 77 15872000
76413431 Ari B April 12, 2020, 5:42 p.m. OK GNU C++17 (64) TESTS 32 77 16691200
76432538 killer4639 B April 12, 2020, 9:51 p.m. OK GNU C++17 (64) TESTS 32 77 16896000
76409079 Rahul B April 12, 2020, 5:09 p.m. OK GNU C++17 (64) TESTS 32 78 11673600
76438971 Cyanic B April 13, 2020, 12:54 a.m. OK GNU C++17 (64) TESTS 32 78 12800000
76361767 Frame233 B April 12, 2020, 2:41 p.m. OK GNU C++17 (64) TESTS 32 78 12800000
76356408 achvanov B April 12, 2020, 2:33 p.m. OK GNU C++17 (64) TESTS 32 78 13414400
76426755 cribabby B April 12, 2020, 8:07 p.m. OK Java 11 TESTS 32 280 30208000
76362324 Musin B April 12, 2020, 2:42 p.m. OK Java 11 TESTS 32 405 49766400
76362531 mikit B April 12, 2020, 2:42 p.m. OK Java 11 TESTS 32 436 33280000
76373315 TheSawan B April 12, 2020, 3 p.m. OK Java 11 TESTS 32 514 86528000
76371954 aman28rwt B April 12, 2020, 2:57 p.m. OK Java 8 TESTS 32 140 3072000
76364265 StayAwayFromBitches B April 12, 2020, 2:45 p.m. OK Java 8 TESTS 32 155 4198400
76378936 DarLam B April 12, 2020, 3:10 p.m. OK Java 8 TESTS 32 170 4403200
76351526 Taran_1407 B April 12, 2020, 2:27 p.m. OK Java 8 TESTS 32 186 4096000
76353250 cwise B April 12, 2020, 2:29 p.m. OK Java 8 TESTS 32 233 50995200
76394323 fnch B April 12, 2020, 3:44 p.m. OK Java 8 TESTS 32 264 11264000
76441754 Charlesna B April 13, 2020, 2:11 a.m. OK Java 8 TESTS 32 264 16076800
76421601 spar5h B April 12, 2020, 7:02 p.m. OK Java 8 TESTS 32 265 48435200
76361665 SecondThread B April 12, 2020, 2:41 p.m. OK Java 8 TESTS 32 295 4198400
76392647 Xylenox B April 12, 2020, 3:40 p.m. OK Java 8 TESTS 32 296 15769600
76351848 darnley B April 12, 2020, 2:27 p.m. OK Kotlin TESTS 32 530 21094400
76354192 Tlatoani B April 12, 2020, 2:30 p.m. OK Kotlin TESTS 32 530 39116800
76373773 alexey.enkov B April 12, 2020, 3 p.m. OK Kotlin TESTS 32 545 25292800
76373655 knightL B April 12, 2020, 3 p.m. OK Kotlin TESTS 32 982 70553600
76368617 mban259 B April 12, 2020, 2:51 p.m. OK Mono C# TESTS 32 233 16691200
76362655 keymoon B April 12, 2020, 2:42 p.m. OK Mono C# TESTS 32 265 16179200
76355589 lxhgww B April 12, 2020, 2:32 p.m. OK MS C++ TESTS 32 78 6860800
76375195 NotEvenWrong B April 12, 2020, 3:03 p.m. OK MS C++ TESTS 32 124 9728000
76368792 poopi B April 12, 2020, 2:52 p.m. OK MS C++ TESTS 32 217 6144000
76386376 tarattata1 B April 12, 2020, 3:26 p.m. OK MS C++ 2017 TESTS 32 108 7168000
76353975 pichulia B April 12, 2020, 2:30 p.m. OK MS C++ 2017 TESTS 32 108 7168000
76374926 P___ B April 12, 2020, 3:02 p.m. OK MS C++ 2017 TESTS 32 109 6451200
76375719 CrashMaster B April 12, 2020, 3:04 p.m. OK MS C++ 2017 TESTS 32 109 6553600
76428146 extremum B April 12, 2020, 8:28 p.m. OK MS C++ 2017 TESTS 32 202 6758400
76359563 Petr B April 12, 2020, 2:38 p.m. OK MS C++ 2017 TESTS 32 202 6758400
76383078 Friska B April 12, 2020, 3:19 p.m. OK MS C++ 2017 TESTS 32 218 5222400
76383051 danilgrig B April 12, 2020, 3:19 p.m. OK MS C++ 2017 TESTS 32 234 7577600
76394087 bcollet B April 12, 2020, 3:43 p.m. OK PyPy 2 TESTS 32 311 14233600
76355338 kabeer27 B April 12, 2020, 2:32 p.m. OK PyPy 2 TESTS 32 373 22425600
76369176 nagiss B April 12, 2020, 2:52 p.m. OK PyPy 3 TESTS 32 343 12390400
76353372 titia B April 12, 2020, 2:29 p.m. OK PyPy 3 TESTS 32 343 14540800
76438704 malylesio B April 13, 2020, 12:45 a.m. OK PyPy 3 TESTS 32 358 14950400
76366737 nagitaosu B April 12, 2020, 2:48 p.m. OK PyPy 3 TESTS 32 389 13721600
76439664 malylesio B April 13, 2020, 1:14 a.m. OK PyPy 3 TESTS 32 389 14950400
76359584 tamato B April 12, 2020, 2:38 p.m. OK PyPy 3 TESTS 32 389 18739200
76383497 slimper B April 12, 2020, 3:20 p.m. OK PyPy 3 TESTS 32 420 14336000
76353931 conqueror_of_tourist B April 12, 2020, 2:30 p.m. OK PyPy 3 TESTS 32 451 20889600
76366364 pineriver B April 12, 2020, 2:48 p.m. OK PyPy 3 TESTS 32 452 24576000
76360150 neterukun B April 12, 2020, 2:39 p.m. OK PyPy 3 TESTS 32 467 20172800
76380926 pa.n.ik B April 12, 2020, 3:14 p.m. OK Python 2 TESTS 32 826 182272000
76402586 old_boo B April 12, 2020, 4:02 p.m. OK Python 3 TESTS 32 498 9318400
76371839 EbTech B April 12, 2020, 2:57 p.m. OK Rust TESTS 32 46 7987200
76372236 sansen B April 12, 2020, 2:58 p.m. OK Rust TESTS 32 62 6758400

remove filters

Back to search problems