Codeforces Round 845 (Div. 2) and ByteRace 2023

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
1777 Codeforces Round 845 (Div. 2) and ByteRace 2023 FINISHED False 7200 57511499 Jan. 21, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3551 ) D Score of a Tree PROGRAMMING bitmasks combinatorics dfs and similar dp probabilities trees

B"You are given a tree of n nodes, rooted at 1 . Every node has a value of either 0 or 1 at time t=0 . At any integer time t>0 , the value of a node becomes the bitwise XOR of the values of its children at time t - 1 ; the values of leaves become 0 since they don't have any children. Let S(t) denote the sum of values of all nodes at time t . Let F(A) denote the sum of S(t) across all values of t such that 0 <= t <= 10^{100} , where A is the initial assignment of 0 s and 1 s in the tree. The task is to find the sum of F(A) for all 2^n initial configurations of 0 s and 1 s in the tree. Print the sum modulo 10^9+7 . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^5 ). The description of the test cases follows. The first line of each test case contains n ( 1 <= n <= 2 cdot 10^5 ) -- the number of nodes in the tree. The next n-1 lines of each test case contain two integers each -- u , v indicating an edge between u and v ( 1 <= u, v <= n ). It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . Output the sum modulo 10^9+7 for each test case. Let us find F(A) for the configuration A = [0,1,0,0,1,1] ( A[i] denotes the value of node i ). Initially (at t = 0 ) our tree is as shown in the picture below. In each node, two values are shown: the number and the value of this node. S(0) for this configuration is 3 . At t = 1 the configuration changes to [1,0,0,0,0,0] . The tree looks as shown below. S(1) = 1 . At t = 2 the configuration changes to [0,0,0,0,0,0] . The tree looks as shown below. S(2) = 0 . For all t>2 , the graph remains unchanged, so S(t)=0 for all t > 2 . So, for the initial config"...

Tutorials

Codeforces Round #845 (Div. 2) and ByteRace 2023 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
190016362 chro4896 D Jan. 21, 2023, 4:06 p.m. OK GNU C11 TESTS 54 436 16793600
190011643 FC_Viiiiictor_K D Jan. 21, 2023, 3:51 p.m. OK GNU C++14 TESTS 54 62 22732800
190013241 Somdium D Jan. 21, 2023, 3:56 p.m. OK GNU C++14 TESTS 54 108 14438400
190054585 Ling_Lover D Jan. 22, 2023, 2:55 a.m. OK GNU C++14 TESTS 54 109 16179200
190049738 tredsused70 D Jan. 21, 2023, 11:35 p.m. OK GNU C++14 TESTS 54 109 17817600
190035220 DesiCoder D Jan. 21, 2023, 6:53 p.m. OK GNU C++14 TESTS 54 109 19353600
190019436 2018ljw D Jan. 21, 2023, 4:17 p.m. OK GNU C++14 TESTS 54 109 20787200
190051984 zltzlt D Jan. 22, 2023, 1:10 a.m. OK GNU C++14 TESTS 54 109 20787200
190055292 zxy11 D Jan. 22, 2023, 3:15 a.m. OK GNU C++14 TESTS 54 109 28876800
190012267 Mingyu331 D Jan. 21, 2023, 3:53 p.m. OK GNU C++14 TESTS 54 124 15360000
190015624 Acfboy D Jan. 21, 2023, 4:04 p.m. OK GNU C++14 TESTS 54 124 16179200
190014277 yemuzhe D Jan. 21, 2023, 3:59 p.m. OK GNU C++17 TESTS 54 93 18534400
190040466 Azimjonm0012 D Jan. 21, 2023, 7:51 p.m. OK GNU C++17 TESTS 54 108 18534400
190047948 panda_2500 D Jan. 21, 2023, 10:25 p.m. OK GNU C++17 TESTS 54 109 10649600
190060867 Prakhar1998 D Jan. 22, 2023, 5:20 a.m. OK GNU C++17 TESTS 54 109 15360000
190049280 remastered D Jan. 21, 2023, 11:14 p.m. OK GNU C++17 TESTS 54 109 16179200
190023158 Kechen_Li D Jan. 21, 2023, 4:29 p.m. OK GNU C++17 TESTS 54 124 10444800
190023171 orangecalculator D Jan. 21, 2023, 4:29 p.m. OK GNU C++17 TESTS 54 124 11059200
190045914 Hizzl D Jan. 21, 2023, 9:30 p.m. OK GNU C++17 TESTS 54 124 14643200
190059901 Krypto_Ray D Jan. 22, 2023, 5:05 a.m. OK GNU C++17 TESTS 54 124 15052800
190014423 gen D Jan. 21, 2023, 4 p.m. OK GNU C++17 TESTS 54 124 15360000
190058035 cosinechicken D Jan. 22, 2023, 4:31 a.m. OK GNU C++17 (64) TESTS 54 93 15769600
190047428 daukah_ D Jan. 21, 2023, 10:08 p.m. OK GNU C++17 (64) TESTS 54 109 24064000
190053998 Once_I_Liked_AGirl D Jan. 22, 2023, 2:29 a.m. OK GNU C++17 (64) TESTS 54 109 28057600
190018399 lelbaba D Jan. 21, 2023, 4:13 p.m. OK GNU C++17 (64) TESTS 54 109 28057600
190014956 Siberian D Jan. 21, 2023, 4:01 p.m. OK GNU C++17 (64) TESTS 54 109 28057600
190062287 LXH-cat D Jan. 22, 2023, 5:40 a.m. OK GNU C++17 (64) TESTS 54 109 28057600
190050073 cjoa D Jan. 21, 2023, 11:50 p.m. OK GNU C++17 (64) TESTS 54 109 28876800
190019856 FightHawk D Jan. 21, 2023, 4:18 p.m. OK GNU C++17 (64) TESTS 54 109 29696000
190023205 AboAImanaI D Jan. 21, 2023, 4:29 p.m. OK GNU C++17 (64) TESTS 54 109 30412800
190055963 YaoLingF D Jan. 22, 2023, 3:34 a.m. OK GNU C++17 (64) TESTS 54 109 32051200
190022126 threethreetwothree D Jan. 21, 2023, 4:26 p.m. OK GNU C++20 (64) TESTS 54 62 36454400
190012685 diobrando97 D Jan. 21, 2023, 3:54 p.m. OK GNU C++20 (64) TESTS 54 93 12697600
190057065 Misono_Mika D Jan. 22, 2023, 4:07 a.m. OK GNU C++20 (64) TESTS 54 93 14848000
190037763 drdilyor D Jan. 21, 2023, 7:17 p.m. OK GNU C++20 (64) TESTS 54 93 15052800
190061963 KasodaniKyouko D Jan. 22, 2023, 5:36 a.m. OK GNU C++20 (64) TESTS 54 93 16179200
190047248 moonshine D Jan. 21, 2023, 10:03 p.m. OK GNU C++20 (64) TESTS 54 93 16384000
190059489 Haven_ D Jan. 22, 2023, 4:58 a.m. OK GNU C++20 (64) TESTS 54 93 17715200
190018732 Kyou_mo_kawaii D Jan. 21, 2023, 4:15 p.m. OK GNU C++20 (64) TESTS 54 93 18944000
190017158 Nero D Jan. 21, 2023, 4:09 p.m. OK GNU C++20 (64) TESTS 54 93 19865600
190056051 Weirdo D Jan. 22, 2023, 3:37 a.m. OK GNU C++20 (64) TESTS 54 93 22835200
190015654 WORTH D Jan. 21, 2023, 4:04 p.m. OK Java 11 TESTS 54 654 101580800
190049715 IanISam D Jan. 21, 2023, 11:34 p.m. OK Java 11 TESTS 54 857 109977600
190017789 knightL D Jan. 21, 2023, 4:11 p.m. OK Java 11 TESTS 54 904 190259200
190015069 dzhi D Jan. 21, 2023, 4:02 p.m. OK Java 11 TESTS 54 935 68505600
190017178 profchi D Jan. 21, 2023, 4:09 p.m. OK Java 11 TESTS 54 998 77004800
190034278 merlin_ D Jan. 21, 2023, 6:47 p.m. OK Java 17 TESTS 54 560 71168000
190047387 pc_invader D Jan. 21, 2023, 10:07 p.m. OK Java 17 TESTS 54 639 74956800
190021297 tbs-jyy D Jan. 21, 2023, 4:23 p.m. OK Java 17 TESTS 54 733 59084800
190034326 invincible777 D Jan. 21, 2023, 6:48 p.m. OK Java 8 TESTS 54 389 58572800
190045945 MagentaCobra D Jan. 21, 2023, 9:31 p.m. OK Java 8 TESTS 54 436 60825600
190046344 DylanSmith D Jan. 21, 2023, 9:40 p.m. OK Java 8 TESTS 54 701 96153600
190024781 harshsingla06 D Jan. 21, 2023, 4:33 p.m. OK Java 8 TESTS 54 764 54476800
190012014 6ziv D Jan. 21, 2023, 3:52 p.m. OK MS C++ 2017 TESTS 54 140 9011200
190048893 exoji2e D Jan. 21, 2023, 10:58 p.m. OK PyPy 3 TESTS 54 701 66662400
190035487 KanishkGoel D Jan. 21, 2023, 6:55 p.m. OK PyPy 3 TESTS 54 1996 33792000
190048070 RobinFromTheHood D Jan. 21, 2023, 10:28 p.m. OK PyPy 3-64 TESTS 54 358 60211200
190043972 sushmanth.dampur8780 D Jan. 21, 2023, 8:50 p.m. OK PyPy 3-64 TESTS 54 374 61132800
190044210 beethoven97 D Jan. 21, 2023, 8:54 p.m. OK PyPy 3-64 TESTS 54 389 32256000
190058282 flygon D Jan. 22, 2023, 4:36 a.m. OK PyPy 3-64 TESTS 54 390 342937600
190048972 RobinFromTheHood D Jan. 21, 2023, 11:01 p.m. OK PyPy 3-64 TESTS 54 404 64921600
190042018 gardengnome D Jan. 21, 2023, 8:15 p.m. OK PyPy 3-64 TESTS 54 468 74035200
190014167 yupooh D Jan. 21, 2023, 3:59 p.m. OK PyPy 3-64 TESTS 54 498 72908800
190022222 gardengnome D Jan. 21, 2023, 4:26 p.m. OK PyPy 3-64 TESTS 54 514 88371200
190060429 gardengnome D Jan. 22, 2023, 5:13 a.m. OK PyPy 3-64 TESTS 54 529 80281600
190013347 Sort D Jan. 21, 2023, 3:56 p.m. OK PyPy 3-64 TESTS 54 623 110080000
190018665 LilRat D Jan. 21, 2023, 4:14 p.m. OK Rust 2021 TESTS 54 780 46489600

remove filters

Back to search problems