Codeforces Round 1019 (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
2103 Codeforces Round 1019 (Div. 2) FINISHED False 7200 31159523 April 21, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 609 ) F Maximize Nor PROGRAMMING bitmasks data structures implementation

The bitwise nor(^{\text{∗}}) of an array of (k)-bit integers (b_1, b_2, \ldots, b_m) can be computed by calculating the bitwise nor cumulatively from left to right. More formally, (\operatorname{nor}(b_1, b_2, \ldots, b_m) = \operatorname{nor}(\operatorname{nor}(b_1, b_2, \ldots, b_{m - 1}), b_m)) for (m\ge 2), and (\operatorname{nor}(b_1) = b_1). You are given an array of (k)-bit integers (a_1, a_2, \ldots, a_n). For each index (i) ((1\le i\le n)), find the maximum bitwise nor among all subarrays(^{\text{†}}) of (a) containing index (i). In other words, for each index (i), find the maximum value of (\operatorname{nor}(a_l, a_{l+1}, \ldots, a_r)) among all (1 \le l \le i \le r \le n). (^{\text{∗}}) The logical nor of two boolean values is (1) if both values are (0), and (0) otherwise. The bitwise nor of two (k)-bit integers is calculated by performing the logical nor operation on each pair of the corresponding bits. For example, let us compute (\operatorname{nor}(2, 6)) when they are represented as (4)-bit numbers. In binary, (2)=(0010_2) and (6=0110_2). Therefore, (\operatorname{nor}(2,6) = 1001_2 = 9) as by performing the logical nor operations from left to right, we have: (\operatorname{nor}(0,0) = 1) (\operatorname{nor}(0,1) = 0) (\operatorname{nor}(1,0) = 0) (\operatorname{nor}(1,1) = 0) Note that if (2) and (6) were represented as (3)-bit integers instead, then (\operatorname{nor}(2,6) = 1). (^{\text{†}})An array (x) is a subarray of an array (y) if (x) can be obtained from (y) by the deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of

Tutorials

142149

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
316589880 lanjalakompaa F April 21, 2025, 4:31 p.m. OK C++17 (GCC 7-32) TESTS 87 265 41164800
316579900 anirbans_en F April 21, 2025, 4:07 p.m. OK C++17 (GCC 7-32) TESTS 87 484 66048000
316632984 OIer_kzc F April 22, 2025, 4:34 a.m. OK C++17 (GCC 7-32) TESTS 87 609 148889600
316586794 KA661 F April 21, 2025, 4:24 p.m. OK C++17 (GCC 7-32) TESTS 87 640 1638400
316619447 TheSahib F April 22, 2025, 12:03 a.m. OK C++17 (GCC 7-32) TESTS 87 687 116736000
316632614 timer2024 F April 22, 2025, 4:28 a.m. OK C++17 (GCC 7-32) TESTS 87 702 14848000
316619457 dmraykhan F April 22, 2025, 12:04 a.m. OK C++17 (GCC 7-32) TESTS 87 734 111411200
316619581 TheSahib F April 22, 2025, 12:08 a.m. OK C++17 (GCC 7-32) TESTS 87 749 116736000
316619329 TheSahib F April 21, 2025, 11:59 p.m. OK C++17 (GCC 7-32) TESTS 87 764 217907200
316584462 justin_g_20 F April 21, 2025, 4:18 p.m. OK C++17 (GCC 7-32) TESTS 87 780 167321600
316610428 kaiboy F April 21, 2025, 7:20 p.m. OK C++20 (GCC 13-64) TESTS 87 249 2150400
316588492 _Serge_ F April 21, 2025, 4:28 p.m. OK C++20 (GCC 13-64) TESTS 87 296 21708800
316596225 fishcathu F April 21, 2025, 5:20 p.m. OK C++20 (GCC 13-64) TESTS 87 374 921600
316597168 ahsoltan F April 21, 2025, 5:27 p.m. OK C++20 (GCC 13-64) TESTS 87 374 1228800
316594887 ButterflyDew F April 21, 2025, 5:13 p.m. OK C++20 (GCC 13-64) TESTS 87 390 65126400
316584887 pegasusz_0013 F April 21, 2025, 4:19 p.m. OK C++20 (GCC 13-64) TESTS 87 406 86835200
316588949 kotatsugame F April 21, 2025, 4:29 p.m. OK C++20 (GCC 13-64) TESTS 87 436 26726400
316589225 tpliem09dana F April 21, 2025, 4:30 p.m. OK C++20 (GCC 13-64) TESTS 87 546 241766400
316596109 Misuki F April 21, 2025, 5:19 p.m. OK C++20 (GCC 13-64) TESTS 87 639 104448000
316597219 kotatsugame F April 21, 2025, 5:27 p.m. OK C++20 (GCC 13-64) TESTS 87 655 96870400
316579701 Levchenko F April 21, 2025, 4:06 p.m. OK C++23 (GCC 14-64, msys2) TESTS 87 140 16179200
316636153 beta99999 F April 22, 2025, 5:19 a.m. OK C++23 (GCC 14-64, msys2) TESTS 87 155 16076800
316635386 beta99999 F April 22, 2025, 5:09 a.m. OK C++23 (GCC 14-64, msys2) TESTS 87 156 16076800
316617568 kaka_haha F April 21, 2025, 8:42 p.m. OK C++23 (GCC 14-64, msys2) TESTS 87 171 16179200
316618984 bera_674 F April 21, 2025, 9 p.m. OK C++23 (GCC 14-64, msys2) TESTS 87 218 43520000
316623943 PeruvianCartel F April 22, 2025, 1:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 87 281 102400
316596198 tfg F April 21, 2025, 5:20 p.m. OK C++23 (GCC 14-64, msys2) TESTS 87 296 102400
316587372 Nachia F April 21, 2025, 4:25 p.m. OK C++23 (GCC 14-64, msys2) TESTS 87 437 921600
316620156 SomethingNew F April 22, 2025, 12:23 a.m. OK C++23 (GCC 14-64, msys2) TESTS 87 452 55193600
316587808 linearspace F April 21, 2025, 4:26 p.m. OK C++23 (GCC 14-64, msys2) TESTS 87 452 93900800
316635279 ahmedafeef F April 22, 2025, 5:07 a.m. OK GNU C11 TESTS 87 624 2560000
316589074 Hellia F April 21, 2025, 4:29 p.m. OK Go TESTS 87 3093 181452800
316582536 mrkushkansal F April 21, 2025, 4:13 p.m. OK Java 8 TESTS 87 2718 204800
316582569 Kira_Dev F April 21, 2025, 4:13 p.m. OK Kotlin 1.7 TESTS 87 1686 104140800
316584358 itzdenkivn F April 21, 2025, 4:18 p.m. OK PyPy 3-64 TESTS 87 1968 208486400
316587454 pratibha.k1620 F April 21, 2025, 4:25 p.m. OK PyPy 3-64 TESTS 87 3828 367616000
316620031 samchen123 F April 22, 2025, 12:20 a.m. OK PyPy 3-64 TESTS 87 3952 361881600
316598988 JakeMate14 F April 21, 2025, 5:40 p.m. OK Rust 2021 TESTS 87 640 56115200
316583444 dinhthanhneymar F April 21, 2025, 4:15 p.m. OK Rust 2021 TESTS 87 780 48742400
316589294 DeanMenezes93 F April 21, 2025, 4:30 p.m. OK Rust 2021 TESTS 87 781 49049600
316590230 dom4429 F April 21, 2025, 4:32 p.m. OK Rust 2021 TESTS 87 1312 200499200

remove filters

Back to search problems