Codeforces Round 731 (Div. 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
1547 Codeforces Round 731 (Div. 3) FINISHED False 8100 111425111 July 10, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17115 ) D Co-growing Sequence PROGRAMMING bitmasks

B"A sequence of non-negative integers a_1, a_2, ... , a_n is called growing if for all i from 1 to n - 1 all ones (of binary representation) in a_i are in the places of ones (of binary representation) in a_{i + 1} (in other words, a_i : & : a_{i + 1} = a_i , where & denotes bitwise AND). If n = 1 then the sequence is considered growing as well. For example, the following four sequences are growing: The following three sequences are non-growing: Consider two sequences of non-negative integers x_1, x_2, ... , x_n and y_1, y_2, ... , y_n . Let's call this pair of sequences co-growing if the sequence x_1 oplus y_1, x_2 oplus y_2, ... , x_n oplus y_n is growing where oplus denotes bitwise XOR. You are given a sequence of integers x_1, x_2, ... , x_n . Find the lexicographically minimal sequence y_1, y_2, ... , y_n such that sequences x_i and y_i are co-growing. The sequence a_1, a_2, ... , a_n is lexicographically smaller than the sequence b_1, b_2, ... , b_n if there exists 1 <= k <= n such that a_i = b_i for any 1 <= i < k but a_k < b_k . The first line contains an integer t ( 1 <= t <= 10^4 ). Then t test cases follow. The first line of each test case contains an integer n ( 1 <= n <= 2 cdot 10^5 ) -- length of the sequence x_i . The second line contains n integers x_1, x_2, ... , x_n ( 0 <= x_i < 2^{30} ) -- elements of the sequence x_i . It is guaranteed that the sum of n overall all test cases doesn't exceed 2 cdot 10^5 . For each test case, print n integers y_1, y_2, ... , y_n ( 0 <= y_i < 2^{30} ) -- lexicographically minimal sequence such that such that it's co-growing with given sequence x_i . "...

Tutorials

Codeforces Round #731 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
121998977 kathariakhila D July 10, 2021, 4:44 p.m. OK GNU C11 TESTS 6 795 819200
122005578 PranayB003 D July 10, 2021, 5:08 p.m. OK GNU C11 TESTS 7 795 3174400
122031550 KomeijiSatori D July 11, 2021, 3:05 a.m. OK GNU C++11 TESTS 7 62 0
122001494 happywater D July 10, 2021, 4:49 p.m. OK GNU C++11 TESTS 6 62 819200
122034511 kanata90 D July 11, 2021, 4:09 a.m. OK GNU C++11 TESTS 7 77 2662400
122025932 wxhzyr D July 11, 2021, 12:11 a.m. OK GNU C++11 TESTS 7 78 1433600
121998723 Puslim D July 10, 2021, 4:44 p.m. OK GNU C++11 TESTS 6 93 0
122038606 sayaaa D July 11, 2021, 5:35 a.m. OK GNU C++11 TESTS 8 93 0
122031719 zxjyes D July 11, 2021, 3:08 a.m. OK GNU C++11 TESTS 7 93 819200
122034374 BilibiliTDASC D July 11, 2021, 4:05 a.m. OK GNU C++11 TESTS 7 93 819200
122025776 sdfz171047 D July 11, 2021, 12:03 a.m. OK GNU C++11 TESTS 7 93 1433600
122032107 Love_Jacques D July 11, 2021, 3:17 a.m. OK GNU C++11 TESTS 7 93 1638400
122021458 maxcruickshanks D July 10, 2021, 9:12 p.m. OK GNU C++14 TESTS 7 77 819200
122038641 dhrutik505 D July 11, 2021, 5:36 a.m. OK GNU C++14 TESTS 8 77 1638400
122002297 Sachin746 D July 10, 2021, 4:49 p.m. OK GNU C++14 TESTS 6 78 921600
122000498 nishikanth D July 10, 2021, 4:47 p.m. OK GNU C++14 TESTS 6 78 2355200
122002229 dozerex D July 10, 2021, 4:49 p.m. OK GNU C++14 TESTS 6 78 2355200
122009378 FeatherV D July 10, 2021, 5:46 p.m. OK GNU C++14 TESTS 7 93 0
122036967 villizain6 D July 11, 2021, 5:01 a.m. OK GNU C++14 TESTS 8 93 0
122028510 High_Score D July 11, 2021, 1:47 a.m. OK GNU C++14 TESTS 7 93 819200
122021951 adhm157 D July 10, 2021, 9:27 p.m. OK GNU C++14 TESTS 7 93 819200
122031301 wesley055555 D July 11, 2021, 3 a.m. OK GNU C++14 TESTS 7 93 819200
122029311 HououinKyoumaII D July 11, 2021, 2:11 a.m. OK GNU C++17 TESTS 7 77 1638400
122004550 kuldeep045 D July 10, 2021, 5:01 p.m. OK GNU C++17 TESTS 6 78 819200
122017421 khadzakos D July 10, 2021, 7:37 p.m. OK GNU C++17 TESTS 7 78 1638400
122004650 keshavgoel_186 D July 10, 2021, 5:01 p.m. OK GNU C++17 TESTS 6 92 819200
122009421 XORring-Samurai D July 10, 2021, 5:46 p.m. OK GNU C++17 TESTS 7 92 1638400
122027832 Murabito-B D July 11, 2021, 1:26 a.m. OK GNU C++17 TESTS 7 93 0
122024496 craze_boy D July 10, 2021, 11:06 p.m. OK GNU C++17 TESTS 7 93 0
122012843 astratakis D July 10, 2021, 6:26 p.m. OK GNU C++17 TESTS 7 93 0
122032911 hunanligong D July 11, 2021, 3:35 a.m. OK GNU C++17 TESTS 7 93 0
122030851 liaoshixing D July 11, 2021, 2:49 a.m. OK GNU C++17 TESTS 7 93 0
122006968 3BS_AS D July 10, 2021, 5:20 p.m. OK GNU C++17 (64) TESTS 7 61 819200
122025375 thomas_li D July 10, 2021, 11:45 p.m. OK GNU C++17 (64) TESTS 7 61 2969600
122015283 kevin D July 10, 2021, 7:02 p.m. OK GNU C++17 (64) TESTS 7 61 2969600
122009805 steinum D July 10, 2021, 5:51 p.m. OK GNU C++17 (64) TESTS 7 62 0
122010330 morty D July 10, 2021, 5:56 p.m. OK GNU C++17 (64) TESTS 7 62 819200
122033848 aeroMustachio D July 11, 2021, 3:54 a.m. OK GNU C++17 (64) TESTS 7 62 1638400
122020667 I_Love_APUK D July 10, 2021, 8:49 p.m. OK GNU C++17 (64) TESTS 7 62 1638400
122011894 rgnerdplayer D July 10, 2021, 6:14 p.m. OK GNU C++17 (64) TESTS 7 62 1638400
122003066 Prakhar6969 D July 10, 2021, 4:53 p.m. OK GNU C++17 (64) TESTS 6 62 3174400
122004690 MazenBatrawi D July 10, 2021, 5:02 p.m. OK GNU C++17 (64) TESTS 6 62 3174400
122010077 Reverie D July 10, 2021, 5:54 p.m. OK Go TESTS 7 234 6041600
122009920 Reverie D July 10, 2021, 5:52 p.m. OK Go TESTS 7 234 6041600
122008304 Reverie D July 10, 2021, 5:34 p.m. OK Go TESTS 7 249 6041600
122010014 Reverie D July 10, 2021, 5:53 p.m. OK Go TESTS 7 249 6041600
122035122 Anuj_Panchal D July 11, 2021, 4:23 a.m. OK Java 11 TESTS 8 218 0
122006003 Decoder_01 D July 10, 2021, 5:12 p.m. OK Java 11 TESTS 7 233 0
122005685 Swapniltri D July 10, 2021, 5:09 p.m. OK Java 11 TESTS 7 280 4710400
122004531 FLORINNN D July 10, 2021, 5:01 p.m. OK Java 11 TESTS 6 280 8089600
122014291 Debojit219 D July 10, 2021, 6:46 p.m. OK Java 11 TESTS 7 296 4608000
122014238 Debojit219 D July 10, 2021, 6:46 p.m. OK Java 11 TESTS 7 326 4608000
122020938 Yuxiang D July 10, 2021, 8:57 p.m. OK Java 11 TESTS 7 327 3891200
122037494 sanjayram21 D July 11, 2021, 5:13 a.m. OK Java 11 TESTS 8 327 4710400
122003503 swapnilganguly1234 D July 10, 2021, 4:55 p.m. OK Java 11 TESTS 6 342 4915200
122019510 Yuxiang D July 10, 2021, 8:21 p.m. OK Java 11 TESTS 7 358 7065600
122000218 wyxfwxh250821 D July 10, 2021, 4:47 p.m. OK Java 8 TESTS 6 139 0
122007252 BruteForcee D July 10, 2021, 5:23 p.m. OK Java 8 TESTS 7 171 11776000
122022611 Snow D July 10, 2021, 9:51 p.m. OK Java 8 TESTS 7 187 0
122019877 dexter_1205 D July 10, 2021, 8:30 p.m. OK Java 8 TESTS 7 202 0
122032363 ashuman231 D July 11, 2021, 3:23 a.m. OK Java 8 TESTS 7 202 13414400
122019836 love1024 D July 10, 2021, 8:29 p.m. OK Java 8 TESTS 7 217 13721600
121998670 Columbus D July 10, 2021, 4:44 p.m. OK Java 8 TESTS 6 218 16281600
122018169 coder_terror D July 10, 2021, 7:52 p.m. OK Java 8 TESTS 7 218 27033600
122025001 GVR D July 10, 2021, 11:29 p.m. OK Java 8 TESTS 7 249 13414400
122035794 Dstoical D July 11, 2021, 4:39 a.m. OK Java 8 TESTS 8 327 0
121999174 chanter D July 10, 2021, 4:45 p.m. OK Kotlin TESTS 6 1185 57139200
122006676 jrlqw D July 10, 2021, 5:18 p.m. OK MS C++ 2017 TESTS 7 280 819200
121999371 UnHingedFrog D July 10, 2021, 4:45 p.m. OK MS C++ 2017 TESTS 6 312 1638400
122017756 Baobab0304 D July 10, 2021, 7:44 p.m. OK MS C++ 2017 TESTS 7 312 1638400
122015171 CtrlAlt D July 10, 2021, 7 p.m. OK MS C++ 2017 TESTS 7 327 1638400
121998179 lrb666 D July 10, 2021, 4:43 p.m. OK MS C++ 2017 TESTS 6 421 3174400
122008246 Tangerine D July 10, 2021, 5:33 p.m. OK MS C++ 2017 TESTS 7 436 1638400
122035939 dlehgns011 D July 11, 2021, 4:42 a.m. OK MS C++ 2017 TESTS 8 452 2560000
121999549 Raehwan0418 D July 10, 2021, 4:45 p.m. OK MS C++ 2017 TESTS 6 561 77516800
122014027 tabibi D July 10, 2021, 6:42 p.m. OK .NET Core C# TESTS 7 171 31641600
122019507 Andrei_Kuz D July 10, 2021, 8:21 p.m. OK PyPy 3 TESTS 7 187 20377600
122017455 dufresne_1949 D July 10, 2021, 7:38 p.m. OK PyPy 3 TESTS 7 187 24473600
122036184 not_tehlka D July 11, 2021, 4:47 a.m. OK PyPy 3 TESTS 8 202 24064000
122017578 dufresne_1949 D July 10, 2021, 7:40 p.m. OK PyPy 3 TESTS 7 218 19865600
122002373 ashish_sasmal D July 10, 2021, 4:49 p.m. OK PyPy 3 TESTS 6 436 21606400
122003086 Mustela_Erminea D July 10, 2021, 4:53 p.m. OK PyPy 3 TESTS 6 436 22732800
122021317 Optimismy D July 10, 2021, 9:08 p.m. OK PyPy 3 TESTS 7 452 20787200
122036253 ktthree D July 11, 2021, 4:48 a.m. OK PyPy 3 TESTS 8 452 22425600
122001192 sakshatmali D July 10, 2021, 4:48 p.m. OK PyPy 3 TESTS 6 483 21811200
122016770 yashraju D July 10, 2021, 7:26 p.m. OK PyPy 3 TESTS 7 499 87142400
122019238 jvanelteren D July 10, 2021, 8:15 p.m. OK Python 3 TESTS 7 280 21196800
122004736 ciktik D July 10, 2021, 5:02 p.m. OK Python 3 TESTS 6 311 21606400
122002599 neonv D July 10, 2021, 4:52 p.m. OK Python 3 TESTS 6 311 23654400
122033892 preet_mungra D July 11, 2021, 3:55 a.m. OK Python 3 TESTS 7 358 21606400
122010142 zdhyey D July 10, 2021, 5:55 p.m. OK Python 3 TESTS 7 358 21606400
122003446 NeoCipher D July 10, 2021, 4:55 p.m. OK Python 3 TESTS 6 374 18739200
122008357 radoan.sharkar.richi D July 10, 2021, 5:35 p.m. OK Python 3 TESTS 7 389 17612800
122004502 samyaksrivastava9 D July 10, 2021, 5:01 p.m. OK Python 3 TESTS 6 405 17715200
122003867 _unstable_atom D July 10, 2021, 4:57 p.m. OK Python 3 TESTS 6 421 15872000
122034309 KeiTsukishima D July 11, 2021, 4:04 a.m. OK Python 3 TESTS 7 451 18636800

remove filters

Back to search problems