Codeforces Round 746 (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
1592 Codeforces Round 746 (Div. 2) FINISHED False 7200 103994663 Oct. 3, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1695 ) E Bored Bakry PROGRAMMING bitmasks greedy math two pointers

B"Bakry got bored of solving problems related to xor, so he asked you to solve this problem for him. You are given an array a of n integers [a_1, a_2, ldots, a_n] . Let's call a subarray a_{l}, a_{l+1}, a_{l+2}, ldots, a_r good if a_l , & , a_{l+1} , & , a_{l+2} , ldots , & , a_r > a_l oplus a_{l+1} oplus a_{l+2} ldots oplus a_r , where oplus denotes the bitwise XOR operation and & denotes the bitwise AND operation. Find the length of the longest good subarray of a , or determine that no such subarray exists. The first line contains a single integer n ( 1 <= n <= 10^6 ) -- the length of the array. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^6 ) -- elements of the array. Print a single integer -- the length of the longest good subarray. If there are no good subarrays, print 0 . In the first case, the answer is 2 , as the whole array is good: 5 & 6 = 4 > 5 oplus 6 = 3 . In the third case, the answer is 4 , and one of the longest good subarrays is [a_2, a_3, a_4, a_5] : 1 & 3 & 3 &1 = 1 > 1 oplus 3 oplus 3 oplus 1 = 0 . "...

Tutorials

95583

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130751898 a999999 E Oct. 4, 2021, 3:02 a.m. OK GNU C++14 TESTS 47 296 28569600
130759631 2919805063 E Oct. 4, 2021, 5:17 a.m. OK GNU C++14 TESTS 47 358 27750400
130749128 syksykCCC E Oct. 4, 2021, 2:10 a.m. OK GNU C++14 TESTS 47 374 19763200
130748820 JOOG E Oct. 4, 2021, 2:05 a.m. OK GNU C++14 TESTS 47 389 16281600
130722632 wxy2005 E Oct. 3, 2021, 4:34 p.m. OK GNU C++14 TESTS 47 405 31846400
130749200 JoesSR E Oct. 4, 2021, 2:12 a.m. OK GNU C++14 TESTS 47 421 20172800
130757192 zhujunchao E Oct. 4, 2021, 4:37 a.m. OK GNU C++14 TESTS 47 421 23961600
130750851 liqingyang E Oct. 4, 2021, 2:42 a.m. OK GNU C++14 TESTS 47 436 40448000
130755318 zqyyy E Oct. 4, 2021, 4:05 a.m. OK GNU C++14 TESTS 47 467 24576000
130726120 DoubleIce E Oct. 3, 2021, 5:25 p.m. OK GNU C++14 TESTS 47 467 35840000
130737652 abeker E Oct. 3, 2021, 8:03 p.m. OK GNU C++17 TESTS 47 358 16384000
130752877 Enilrats E Oct. 4, 2021, 3:20 a.m. OK GNU C++17 TESTS 47 358 19763200
130758712 bluesky111 E Oct. 4, 2021, 5:01 a.m. OK GNU C++17 TESTS 47 374 19763200
130729758 Toosample E Oct. 3, 2021, 6:01 p.m. OK GNU C++17 TESTS 47 374 19763200
130744349 Abdelrahman_Etman E Oct. 3, 2021, 11:13 p.m. OK GNU C++17 TESTS 47 404 20172800
130759049 BOT_SaNyA E Oct. 4, 2021, 5:07 a.m. OK GNU C++17 TESTS 47 420 19968000
130753579 MetalPower E Oct. 4, 2021, 3:32 a.m. OK GNU C++17 TESTS 47 420 35840000
130749110 sky123 E Oct. 4, 2021, 2:10 a.m. OK GNU C++17 TESTS 47 420 40857600
130747109 Ivan_123 E Oct. 4, 2021, 1:24 a.m. OK GNU C++17 TESTS 47 420 40857600
130747011 Ivan_123 E Oct. 4, 2021, 1:21 a.m. OK GNU C++17 TESTS 47 420 40857600
130743658 neal E Oct. 3, 2021, 10:44 p.m. OK GNU C++17 (64) TESTS 47 140 16588800
130743584 neal E Oct. 3, 2021, 10:41 p.m. OK GNU C++17 (64) TESTS 47 171 16588800
130757607 wty2016 E Oct. 4, 2021, 4:44 a.m. OK GNU C++17 (64) TESTS 47 186 39014400
130743612 neal E Oct. 3, 2021, 10:42 p.m. OK GNU C++17 (64) TESTS 47 187 16588800
130741511 jesse_pinkman_619 E Oct. 3, 2021, 9:32 p.m. OK GNU C++17 (64) TESTS 47 249 16486400
130725214 rgnerdplayer E Oct. 3, 2021, 5:13 p.m. OK GNU C++17 (64) TESTS 47 280 12492800
130724713 rgnerdplayer E Oct. 3, 2021, 5:10 p.m. OK GNU C++17 (64) TESTS 47 280 12492800
130743386 neal E Oct. 3, 2021, 10:34 p.m. OK GNU C++17 (64) TESTS 47 280 16486400
130731415 Fortin E Oct. 3, 2021, 6:21 p.m. OK GNU C++17 (64) TESTS 47 280 20787200
130744758 ooooxxxx E Oct. 3, 2021, 11:33 p.m. OK GNU C++17 (64) TESTS 47 280 40345600
130733598 dusty.and.rusty E Oct. 3, 2021, 6:52 p.m. OK Java 11 TESTS 47 1247 111616000
130719385 thedesalizes E Oct. 3, 2021, 4:27 p.m. OK Java 8 TESTS 47 1450 60211200
130730291 forest E Oct. 3, 2021, 6:07 p.m. OK MS C++ 2017 TESTS 47 1699 11980800
130734556 hxu10 E Oct. 3, 2021, 7:07 p.m. OK PyPy 2 TESTS 47 1653 75059200
130734295 hxu10 E Oct. 3, 2021, 7:03 p.m. OK PyPy 3 TESTS 47 1388 97382400
130734423 hxu10 E Oct. 3, 2021, 7:05 p.m. OK PyPy 3 TESTS 47 1435 97382400
130725166 misorin E Oct. 3, 2021, 5:13 p.m. OK PyPy 3 TESTS 47 3821 211353600
130736524 noogler E Oct. 3, 2021, 7:41 p.m. OK Rust TESTS 47 623 49152000
130736054 noogler E Oct. 3, 2021, 7:32 p.m. OK Rust TESTS 47 763 49152000
130736162 noogler E Oct. 3, 2021, 7:34 p.m. OK Rust TESTS 47 810 49152000

remove filters

Back to search problems