Codeforces Round 757 (Div. 2)

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
1614 Codeforces Round 757 (Div. 2) FINISHED False 7200 99254663 Nov. 26, 2021, 11:15 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 10420 ) C Divan and bitwise operations PROGRAMMING bitmasks combinatorics constructive algorithms dp math 1500

B'Once Divan analyzed a sequence a_1, a_2, ldots, a_n consisting of n non-negative integers as follows. He considered each non-empty subsequence of the sequence a , computed the bitwise XOR of its elements and added up all the XORs, obtaining the coziness of the sequence a . A sequence c is a subsequence of a sequence d if c can be obtained from d by deletion of several (possibly, zero or all) elements. For example, [1, , 2, , 3, , 4] , [2, , 4] , and [2] are subsequences of [1, , 2, , 3, , 4] , but [4, , 3] and [0] are not. Divan was very proud of his analysis, but now he lost the sequence a , and also the coziness value! However, Divan remembers the value of bitwise OR on m contiguous subsegments of the sequence a . It turns out that each element of the original sequence is contained in at least one of these m segments. Divan asks you to help find the coziness of the sequence a using the information he remembers. If several coziness values are possible, print any. As the result can be very large, print the value modulo 10^9 + 7 . The first line contains one integer number t ( 1 <= t <= 10^3 ) -- the number of test cases. The first line of each test case contains two integer numbers n and m ( 1 <= n, m <= 2 cdot 10^5 ) -- the length of the sequence and the number of contiguous segments whose bitwise OR values Divan remembers, respectively. The following m lines describe the segments, one per line. Each segment is described with three integers l , r , and x ( 1 <= l <= r <= n , 0 <= x <= 2^{30} - 1 ) -- the first and last elements of the segment and the bitwise OR of a_l, a_{l + 1}, ldots, a_r , respectively. It is guaranteed that each element of the sequence is contained in at least one of the segments. It is guaranteed that there exists a sequence that satisfies '...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
137073451 gxlois C Nov. 26, 2021, 10:15 p.m. OK D TESTS 42 218 42598400 1500
137050747 Mrgglock C Nov. 26, 2021, 3:18 p.m. OK GNU C11 TESTS 42 78 0 1500
137044702 RealArtist C Nov. 26, 2021, 2:16 p.m. OK GNU C11 TESTS 42 374 58572800 1500
137075026 WHC_MIK_7521X C Nov. 26, 2021, 11:38 p.m. OK GNU C++14 TESTS 42 31 1024000 1500
137075040 WHC_MIK_7521X C Nov. 26, 2021, 11:39 p.m. OK GNU C++14 TESTS 42 31 1024000 1500
137083621 ticmis C Nov. 27, 2021, 4:02 a.m. OK GNU C++14 TESTS 42 31 6144000 1500
137080487 XyzL C Nov. 27, 2021, 2:54 a.m. OK GNU C++14 TESTS 42 46 8396800 1500
137087012 why2333 C Nov. 27, 2021, 5 a.m. OK GNU C++14 TESTS 42 93 0 1500
137034225 DonoToT C Nov. 26, 2021, 1:04 p.m. OK GNU C++14 TESTS 42 109 0 1500
137048184 langminjie C Nov. 26, 2021, 2:50 p.m. OK GNU C++14 TESTS 42 109 0 1500
137089054 664607530 C Nov. 27, 2021, 5:27 a.m. OK GNU C++14 TESTS 42 124 0 1500
137084190 Ximenana C Nov. 27, 2021, 4:14 a.m. OK GNU C++14 TESTS 42 124 0 1500
137083240 DonoToT C Nov. 27, 2021, 3:53 a.m. OK GNU C++14 TESTS 42 124 0 1500
137032935 zwu2020014736 C Nov. 26, 2021, 1 p.m. OK GNU C++17 TESTS 42 46 16793600 1500
137033597 Eddard C Nov. 26, 2021, 1:02 p.m. OK GNU C++17 TESTS 42 109 0 1500
137032514 fansoffans C Nov. 26, 2021, 12:58 p.m. OK GNU C++17 TESTS 42 109 819200 1500
137089295 wangzhuoyue C Nov. 27, 2021, 5:30 a.m. OK GNU C++17 TESTS 42 124 0 1500
137084544 last_sunlights C Nov. 27, 2021, 4:20 a.m. OK GNU C++17 TESTS 42 124 0 1500
137081888 tkj C Nov. 27, 2021, 3:24 a.m. OK GNU C++17 TESTS 42 124 0 1500
137054540 XSEA C Nov. 26, 2021, 4:08 p.m. OK GNU C++17 TESTS 42 124 0 1500
137053703 DRD C Nov. 26, 2021, 3:57 p.m. OK GNU C++17 TESTS 42 124 0 1500
137067777 acirrEcqy C Nov. 26, 2021, 7:35 p.m. OK GNU C++17 TESTS 42 124 0 1500
137090496 mikku C Nov. 27, 2021, 5:44 a.m. OK GNU C++17 TESTS 42 124 0 1500
137076036 N_z__ C Nov. 27, 2021, 12:34 a.m. OK GNU C++17 (64) TESTS 42 31 102400 1500
137042880 N_z__ C Nov. 26, 2021, 2 p.m. OK GNU C++17 (64) TESTS 42 31 102400 1500
137044806 rmnisraili C Nov. 26, 2021, 2:17 p.m. OK GNU C++17 (64) TESTS 42 93 0 1500
137086247 Debapriya010 C Nov. 27, 2021, 4:49 a.m. OK GNU C++17 (64) TESTS 42 93 0 1500
137078046 gaoweijuan_ C Nov. 27, 2021, 1:51 a.m. OK GNU C++17 (64) TESTS 42 93 0 1500
137072977 kant97 C Nov. 26, 2021, 9:54 p.m. OK GNU C++17 (64) TESTS 42 93 0 1500
137060411 puneet_tyagi C Nov. 26, 2021, 5:29 p.m. OK GNU C++17 (64) TESTS 42 93 0 1500
137059502 Igorbunov C Nov. 26, 2021, 5:17 p.m. OK GNU C++17 (64) TESTS 42 93 0 1500
137045083 JR_Jahed C Nov. 26, 2021, 2:20 p.m. OK GNU C++17 (64) TESTS 42 93 0 1500
137044697 MazenBatrawi C Nov. 26, 2021, 2:16 p.m. OK GNU C++17 (64) TESTS 42 93 0 1500
137089431 giangcbg C Nov. 27, 2021, 5:31 a.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137081053 StRabbit C Nov. 27, 2021, 3:06 a.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137079894 Kimble2.0 C Nov. 27, 2021, 2:40 a.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137079458 Ayham_Dabah C Nov. 27, 2021, 2:30 a.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137076800 Nea1 C Nov. 27, 2021, 1:08 a.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137072076 Grapeee C Nov. 26, 2021, 9:24 p.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137070130 AlanSkarica C Nov. 26, 2021, 8:29 p.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137060174 Demotivated C Nov. 26, 2021, 5:26 p.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137053079 lmnopqrst C Nov. 26, 2021, 3:48 p.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137050798 mengxianQAQ C Nov. 26, 2021, 3:18 p.m. OK GNU C++20 (64) TESTS 42 78 0 1500
137073154 dkkv0000 C Nov. 26, 2021, 10:01 p.m. OK Java 11 TESTS 42 187 0 1500
137041090 theanmolsharma C Nov. 26, 2021, 1:51 p.m. OK Java 11 TESTS 42 234 0 1500
137047253 ddwuya C Nov. 26, 2021, 2:40 p.m. OK Java 11 TESTS 42 265 0 1500
137053941 sumitchavan C Nov. 26, 2021, 4 p.m. OK Java 11 TESTS 42 296 0 1500
137048066 the_unseen C Nov. 26, 2021, 2:49 p.m. OK Java 11 TESTS 42 296 0 1500
137031360 future_me C Nov. 26, 2021, 12:55 p.m. OK Java 11 TESTS 42 311 0 1500
137034786 Aman9450 C Nov. 26, 2021, 1:05 p.m. OK Java 11 TESTS 42 311 0 1500
137034075 KoushikRP C Nov. 26, 2021, 1:03 p.m. OK Java 11 TESTS 42 312 0 1500
137034772 SaberXpro C Nov. 26, 2021, 1:05 p.m. OK Java 11 TESTS 42 327 0 1500
137052720 chevish C Nov. 26, 2021, 3:43 p.m. OK Java 11 TESTS 42 327 0 1500
137071576 Adi_7861 C Nov. 26, 2021, 9:08 p.m. OK Java 8 TESTS 42 124 0 1500
137085125 Vinay_Goel_ C Nov. 27, 2021, 4:30 a.m. OK Java 8 TESTS 42 202 0 1500
137062391 akshaygupta26 C Nov. 26, 2021, 5:58 p.m. OK Java 8 TESTS 42 202 0 1500
137091410 sanjayram21 C Nov. 27, 2021, 5:55 a.m. OK Java 8 TESTS 42 218 0 1500
137031691 TCchen C Nov. 26, 2021, 12:56 p.m. OK Java 8 TESTS 42 218 0 1500
137037620 ZiadASadek C Nov. 26, 2021, 1:13 p.m. OK Java 8 TESTS 42 233 0 1500
137060727 smahajan54842 C Nov. 26, 2021, 5:34 p.m. OK Java 8 TESTS 42 265 0 1500
137041325 Akram-Adel C Nov. 26, 2021, 1:52 p.m. OK Java 8 TESTS 42 296 0 1500
137030848 honeysingh18 C Nov. 26, 2021, 12:53 p.m. OK Java 8 TESTS 42 311 512000 1500
137033600 Gurtej C Nov. 26, 2021, 1:02 p.m. OK Java 8 TESTS 42 311 18227200 1500
137030183 songuno1 C Nov. 26, 2021, 12:51 p.m. OK MS C++ 2017 TESTS 42 156 0 1500
137089303 russian_proger C Nov. 27, 2021, 5:30 a.m. OK MS C++ 2017 TESTS 42 436 0 1500
137089985 russian_proger C Nov. 27, 2021, 5:38 a.m. OK MS C++ 2017 TESTS 42 436 0 1500
137049694 Tangerine C Nov. 26, 2021, 3:06 p.m. OK MS C++ 2017 TESTS 42 436 0 1500
137089233 russian_proger C Nov. 27, 2021, 5:29 a.m. OK MS C++ 2017 TESTS 42 451 0 1500
137071291 dino_merlin C Nov. 26, 2021, 9 p.m. OK MS C++ 2017 TESTS 42 467 0 1500
137031112 xgz C Nov. 26, 2021, 12:54 p.m. OK MS C++ 2017 TESTS 42 483 0 1500
137084256 SinaLIze C Nov. 27, 2021, 4:15 a.m. OK MS C++ 2017 TESTS 42 498 0 1500
137036361 Torehalt C Nov. 26, 2021, 1:10 p.m. OK MS C++ 2017 TESTS 42 499 0 1500
137085683 Icemore C Nov. 27, 2021, 4:39 a.m. OK MS C++ 2017 TESTS 42 950 4812800 1500
137043295 saratcsss C Nov. 26, 2021, 2:03 p.m. OK .NET Core C# TESTS 42 296 15872000 1500
137054909 KanishkGoel C Nov. 26, 2021, 4:13 p.m. OK PyPy 3 TESTS 42 218 15667200 1500
137033077 ps_12 C Nov. 26, 2021, 1 p.m. OK PyPy 3 TESTS 42 280 22528000 1500
137029438 sk_loves_Ritika C Nov. 26, 2021, 12:49 p.m. OK PyPy 3 TESTS 42 295 18534400 1500
137065554 whatshisbucket C Nov. 26, 2021, 6:52 p.m. OK PyPy 3 TESTS 42 529 9728000 1500
137082223 1607671824 C Nov. 27, 2021, 3:31 a.m. OK PyPy 3 TESTS 42 545 9625600 1500
137045476 _sujm C Nov. 26, 2021, 2:23 p.m. OK PyPy 3 TESTS 42 545 11673600 1500
137049136 gennadylaptev C Nov. 26, 2021, 3 p.m. OK PyPy 3 TESTS 42 576 9728000 1500
137029191 VarAmu C Nov. 26, 2021, 12:48 p.m. OK PyPy 3 TESTS 42 592 10649600 1500
137062126 hxu10 C Nov. 26, 2021, 5:54 p.m. OK PyPy 3 TESTS 42 654 59904000 1500
137061696 hxu10 C Nov. 26, 2021, 5:48 p.m. OK PyPy 3 TESTS 42 670 60313600 1500
137043141 hsh8086 C Nov. 26, 2021, 2:02 p.m. OK PyPy 3-64 TESTS 42 155 13312000 1500
137048974 aayush0501200 C Nov. 26, 2021, 2:58 p.m. OK PyPy 3-64 TESTS 42 171 13312000 1500
137065949 Adolf988 C Nov. 26, 2021, 6:59 p.m. OK PyPy 3-64 TESTS 42 171 15360000 1500
137054706 Melmetal C Nov. 26, 2021, 4:10 p.m. OK PyPy 3-64 TESTS 42 171 15360000 1500
137033629 prackode C Nov. 26, 2021, 1:02 p.m. OK PyPy 3-64 TESTS 42 218 13926400 1500
137040982 Sujith_ C Nov. 26, 2021, 1:51 p.m. OK PyPy 3-64 TESTS 42 218 29184000 1500
137032176 abhinav_raj07 C Nov. 26, 2021, 12:57 p.m. OK PyPy 3-64 TESTS 42 342 25395200 1500
137031634 KeiTsukishima C Nov. 26, 2021, 12:56 p.m. OK PyPy 3-64 TESTS 42 374 24576000 1500
137073369 ctt312000 C Nov. 26, 2021, 10:11 p.m. OK PyPy 3-64 TESTS 42 467 11059200 1500
137069736 Malek_souissi C Nov. 26, 2021, 8:19 p.m. OK PyPy 3-64 TESTS 42 483 10547200 1500
137042129 OLOGY C Nov. 26, 2021, 1:56 p.m. OK Python 2 TESTS 42 499 17715200 1500
137082238 1607671824 C Nov. 27, 2021, 3:31 a.m. OK Python 3 TESTS 42 342 0 1500
137030373 Kartik_Singh C Nov. 26, 2021, 12:52 p.m. OK Python 3 TESTS 42 358 0 1500
137034758 Harshit_Garg C Nov. 26, 2021, 1:05 p.m. OK Python 3 TESTS 42 452 102400 1500
137028797 QuantumK9 C Nov. 26, 2021, 12:47 p.m. OK Python 3 TESTS 42 467 0 1500
137055457 games.princeraj C Nov. 26, 2021, 4:20 p.m. OK Python 3 TESTS 42 468 0 1500
137053057 _vaibhavDixit___ C Nov. 26, 2021, 3:48 p.m. OK Python 3 TESTS 42 468 0 1500
137044064 Spacelessd C Nov. 26, 2021, 2:09 p.m. OK Python 3 TESTS 42 482 0 1500
137042810 Spacelessd C Nov. 26, 2021, 2 p.m. OK Python 3 TESTS 42 483 0 1500
137040737 _vaibhavDixit___ C Nov. 26, 2021, 1:50 p.m. OK Python 3 TESTS 42 483 0 1500
137032155 Pranav-26 C Nov. 26, 2021, 12:57 p.m. OK Python 3 TESTS 42 483 0 1500
137075330 Spheniscine C Nov. 26, 2021, 11:56 p.m. OK Rust TESTS 42 62 102400 1500

remove filters

Back to search problems