Codeforces Round 1051 (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
2143 Codeforces Round 1051 (Div. 2) FINISHED False 7200 18285923 Sept. 17, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 411 ) F Increasing Xor PROGRAMMING data structures math

You have been gifted a magic sequence of integers: (a_1, a_2, \ldots, a_n). However, this is no ordinary sequence — it can modify itself in a specific way! After observing it carefully, you discovered the rule it follows: Repeatedly, two indices (1 \le i \le j \le n) are chosen. Then, the value at index (j) is updated as: (a_j \leftarrow a_j \oplus a_i).(^{\text{∗}}) Being afraid of strictly increasing sequences, you start asking yourself questions: You are given (q) queries. Each query consists of two integers (l) and (r), and you must determine whether the subarray (a_l, a_{l+1}, \ldots, a_r) can be transformed into a strictly increasing sequence by applying any number of the described operations only within the range (l) to (r), that is, only using indices (l \le i \le j \le r) . (^{\text{∗}})(\oplus) denotes the bitwise XOR operation . 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 contains two integers (n) and (q) ((1 \leq n, q \leq 2 \cdot 10^5)) — the length of the sequence and the number of queries. The second line contains (n) integers (a_1, a_2, \ldots, a_n) ((1 \leq a_i < 2^{20})) — the contents of the sequence. Each of the next (q) lines contains two integers (l) and (r) ((1 \leq l \leq r \leq n)), representing a query. For each query, you must determine whether the subarray (a_l, a_{l+1}, \ldots, a_r) can be transformed into a strictly increasing sequence using the allowed operations. It is guaranteed that the total sum of (n) over all test cases does not exceed (2 \cdot 10^5), and the total sum of (q) over all test cases does not exceed (2 \cdot 10^5). For each query, output YES if the subarray (a_l, a_{l+1}, \ldots, a_r) can be transformed into a strictly increasing sequence using the allowed

Tutorials

Codeforces Round 1051 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
339156266 Warma F Sept. 17, 2025, 4:34 p.m. OK C++17 (GCC 7-32) TESTS 62 1343 8908800
339167572 Alihan_8 F Sept. 17, 2025, 6:12 p.m. OK C++17 (GCC 7-32) TESTS 62 1358 3379200
339194899 max67 F Sept. 18, 2025, 2:31 a.m. OK C++17 (GCC 7-32) TESTS 62 2280 86220800
339171759 pradeepsingh271220 F Sept. 17, 2025, 6:49 p.m. OK C++17 (GCC 7-32) TESTS 62 2359 0
339171253 ICPCCode F Sept. 17, 2025, 6:44 p.m. OK C++17 (GCC 7-32) TESTS 62 2484 0
339170645 mahtab_ F Sept. 17, 2025, 6:39 p.m. OK C++17 (GCC 7-32) TESTS 62 2562 0
339190969 potato167 F Sept. 18, 2025, 1:21 a.m. OK C++17 (GCC 7-32) TESTS 62 2827 28876800
339152071 lg_zhou F Sept. 17, 2025, 4:24 p.m. OK C++17 (GCC 7-32) TESTS 62 3186 1638400
339171434 yvss F Sept. 17, 2025, 6:46 p.m. OK C++17 (GCC 7-32) TESTS 62 3546 36147200
339206226 volcano_2025 F Sept. 18, 2025, 5:24 a.m. OK C++20 (GCC 13-64) TESTS 62 937 5324800
339161977 Rubikun F Sept. 17, 2025, 5:32 p.m. OK C++20 (GCC 13-64) TESTS 62 968 9932800
339208746 sai-17 F Sept. 18, 2025, 5:54 a.m. OK C++20 (GCC 13-64) TESTS 62 984 102400
339143319 StarSilk F Sept. 17, 2025, 4 p.m. OK C++20 (GCC 13-64) TESTS 62 1014 49766400
339197270 njwrz F Sept. 18, 2025, 3:02 a.m. OK C++20 (GCC 13-64) TESTS 62 1187 6451200
339178904 thisislike_fan F Sept. 17, 2025, 8:25 p.m. OK C++20 (GCC 13-64) TESTS 62 1296 38092800
339151619 abc864197532 F Sept. 17, 2025, 4:23 p.m. OK C++20 (GCC 13-64) TESTS 62 1312 6041600
339172618 kevinyang F Sept. 17, 2025, 6:58 p.m. OK C++20 (GCC 13-64) TESTS 62 1390 80384000
339179852 kondasujay2 F Sept. 17, 2025, 8:40 p.m. OK C++20 (GCC 13-64) TESTS 62 1421 5324800
339147505 CTHOOH F Sept. 17, 2025, 4:12 p.m. OK C++20 (GCC 13-64) TESTS 62 1640 5836800
339206145 A_G F Sept. 18, 2025, 5:23 a.m. OK C++23 (GCC 14-64, msys2) TESTS 62 624 0
339162261 jiangly F Sept. 17, 2025, 5:34 p.m. OK C++23 (GCC 14-64, msys2) TESTS 62 780 29184000
339208866 fishcathu F Sept. 18, 2025, 5:56 a.m. OK C++23 (GCC 14-64, msys2) TESTS 62 811 1638400
339170144 wh01sShakin F Sept. 17, 2025, 6:34 p.m. OK C++23 (GCC 14-64, msys2) TESTS 62 812 11264000
339181168 __debugbreak F Sept. 17, 2025, 9:03 p.m. OK C++23 (GCC 14-64, msys2) TESTS 62 842 38195200
339161810 maspy F Sept. 17, 2025, 5:31 p.m. OK C++23 (GCC 14-64, msys2) TESTS 62 874 7987200
339207395 fishcathu F Sept. 18, 2025, 5:39 a.m. OK C++23 (GCC 14-64, msys2) TESTS 62 890 1638400
339183998 kaIimm F Sept. 17, 2025, 10:14 p.m. OK C++23 (GCC 14-64, msys2) TESTS 62 921 102400
339151408 fishcathu F Sept. 17, 2025, 4:23 p.m. OK C++23 (GCC 14-64, msys2) TESTS 62 999 1638400
339196950 424479543 F Sept. 18, 2025, 2:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 62 1015 1433600
339170955 ICPCCode F Sept. 17, 2025, 6:41 p.m. OK GNU C11 TESTS 62 2983 1843200
339206852 harurun4635 F Sept. 18, 2025, 5:32 a.m. OK PyPy 3-64 TESTS 62 3812 20889600

remove filters

Back to search problems