Codeforces Round 930 (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
1936 Codeforces Round 930 (Div. 1) FINISHED False 7200 22605899 Feb. 29, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 513 ) D Bitwise Paradox PROGRAMMING bitmasks data structures greedy two pointers

B'You are given two arrays a and b of size n along with a fixed integer v . An interval [l, r] is called a good interval if (b_l mid b_{l+1} mid ldots mid b_r) ge v , where | denotes the bitwise OR operation. The beauty of a good interval is defined as max(a_l, a_{l+1}, ldots, a_r) . You are given q queries of two types: Please process all queries. 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 two integers n and v ( 1 <= n <= 2 cdot 10^5 , 1 <= v <= 10^9 ). The second line of each testcase contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 10^9 ). The third line of each testcase contains n integers b_1, b_2, ldots, b_n ( 1 <= b_i <= 10^9 ). The fourth line of each testcase contains one integer q ( 1 <= q <= 2 cdot 10^5 ). The i -th of the following q lines contains the description of queries. Each line is of one of two types: It is guaranteed that both the sum of n and the sum of q over all test cases do not exceed 2 cdot 10^5 . For each test case, output the answers for all queries of the second type. In the first test case, a = [2, 1, 3] , b = [2, 2, 3] , and v = 7 . The first query is of the second type and has l = 1 and r = 3 . The largest interval available is [1, 3] , and its bitwise OR is b_1 mid b_2 mid b_3 = 3 which is less than v . Thus, no good interval exists. The second query asks to change b_2 to 5 , so b becomes [2, 5, 3] . The third query is of the second type and has l = 2 and r = 3 . There are three possible intervals: [2, 2] , [3, 3] , and [2, 3] . However, b_2 = 5 < v , b_3 = 3 < v . So only the last interval is go'...

Tutorials

Codeforces Round 930 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
248965278 Um_nik D Feb. 29, 2024, 4:22 p.m. OK GNU C++17 TESTS 57 1434 86016000
249008340 kondasujay2 D March 1, 2024, 12:09 a.m. OK GNU C++17 TESTS 57 2120 117452800
248981791 Amoo_Safar D Feb. 29, 2024, 6:42 p.m. OK GNU C++17 TESTS 57 2620 101683200
248968777 eunlin D Feb. 29, 2024, 4:29 p.m. OK GNU C++17 TESTS 57 3229 53964800
249000764 Kilani D Feb. 29, 2024, 9:36 p.m. OK GNU C++17 TESTS 57 3353 232960000
248983304 chen_zexing D Feb. 29, 2024, 6:50 p.m. OK GNU C++17 TESTS 57 3618 926720000
248971036 UnstoppableChillMachine D Feb. 29, 2024, 4:33 p.m. OK GNU C++17 TESTS 57 3666 60825600
249008291 kondasujay2 D March 1, 2024, 12:08 a.m. OK GNU C++17 TESTS 57 4227 117452800
249028476 Benq D March 1, 2024, 5:18 a.m. OK GNU C++17 TESTS 57 4274 114380800
248984941 MahiruShiina D Feb. 29, 2024, 6:59 p.m. OK GNU C++17 TESTS 57 4538 69836800
249015629 drdilyor D March 1, 2024, 2:31 a.m. OK GNU C++17 (64) TESTS 57 1388 278937600
249010350 CJ_xde_lt D March 1, 2024, 12:53 a.m. OK GNU C++17 (64) TESTS 57 1419 175308800
249010314 CJ_xde_lt D March 1, 2024, 12:53 a.m. OK GNU C++17 (64) TESTS 57 1434 175308800
248965934 aaaaawa D Feb. 29, 2024, 4:23 p.m. OK GNU C++17 (64) TESTS 57 1528 424857600
248967306 Warriors_fsy D Feb. 29, 2024, 4:26 p.m. OK GNU C++17 (64) TESTS 57 1575 82534400
248961661 bashkort D Feb. 29, 2024, 4:14 p.m. OK GNU C++17 (64) TESTS 57 1996 274534400
249020267 lunchbox D March 1, 2024, 3:42 a.m. OK GNU C++17 (64) TESTS 57 2027 91136000
249019220 hhhgjyismine D March 1, 2024, 3:28 a.m. OK GNU C++17 (64) TESTS 57 2074 415232000
249032781 wsc2008qwq D March 1, 2024, 5:58 a.m. OK GNU C++17 (64) TESTS 57 2183 90624000
249015206 drdilyor D March 1, 2024, 2:24 a.m. OK GNU C++17 (64) TESTS 57 2245 88883200
249019257 Wuyanru D March 1, 2024, 3:29 a.m. OK GNU C++20 (64) TESTS 57 1185 428032000
248963888 isaf27 D Feb. 29, 2024, 4:19 p.m. OK GNU C++20 (64) TESTS 57 1200 236544000
248963099 limbo16 D Feb. 29, 2024, 4:17 p.m. OK GNU C++20 (64) TESTS 57 1326 210329600
249006057 perchuts D Feb. 29, 2024, 11:15 p.m. OK GNU C++20 (64) TESTS 57 1388 393011200
248937889 Be_dos D Feb. 29, 2024, 3:29 p.m. OK GNU C++20 (64) TESTS 57 1652 441446400
248935591 yydtq D Feb. 29, 2024, 3:25 p.m. OK GNU C++20 (64) TESTS 57 1669 175308800
248962414 maroonrk D Feb. 29, 2024, 4:16 p.m. OK GNU C++20 (64) TESTS 57 1684 30617600
248991978 ecottea D Feb. 29, 2024, 7:52 p.m. OK GNU C++20 (64) TESTS 57 1684 366592000
249015815 siganai D March 1, 2024, 2:34 a.m. OK GNU C++20 (64) TESTS 57 1700 24064000
249015899 fallleaves01 D March 1, 2024, 2:35 a.m. OK GNU C++20 (64) TESTS 57 1747 104960000
248955570 Egor D Feb. 29, 2024, 4:02 p.m. OK Rust 2021 TESTS 57 2386 74342400

remove filters

Back to search problems