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 |
|---|---|---|---|---|---|---|
| 2096 | Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) | FINISHED | False | 7200 | 31332323 | April 19, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 222 ) | H | Wonderful XOR Problem | PROGRAMMING | bitmasks combinatorics dp fft math |
You are the proud... never mind, just solve this problem. There are (n) intervals (l_1, r_1, l_2, r_2, \ldots l_n, r_n). For each (x) from (0) to (2^m - 1), find the number, modulo (998\,244\,353), of sequences (a_1, a_2, \ldots a_n) such that: (l_i \leq a_i \leq r_i) for all (i) from (1) to (n); (a_1 \oplus a_2 \oplus \ldots \oplus a_n = x), where (\oplus) denotes the bitwise XOR operator . 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 (m) ((1 \leq n \leq 2 \cdot 10^5), (1 \leq m \leq 18)). The (i)-th of the next (n) lines contains two integers (l_i) and (r_i) ((0 \leq l_i \leq r_i < 2^m)). It is guaranteed that the sum of (n) over all test cases does not exceed (2 \cdot 10^5), and the sum of (2^m) over all test cases does not exceed (2^{18}). For each (x) from (0) to (2^m - 1), let: (f_x) be the number of valid sequences, modulo (998\,244\,353); (g_x = f_x \cdot 2^x \mod 998\,244\,353). Here, (f_x) and (g_x) are both integers in the interval (0, 998\,244\,352). Let (h = g_0 \oplus g_1 \oplus \ldots \oplus g_{2^m - 1}). Output a single integer — the value of (h) itself. Do not perform a modulo operation. For the first test case, the values of (f_x) are as follows: (f_0 = 2), because there are (2) valid sequences: (1, 1) and (2, 2); (f_1 = 2), because there are (2) valid sequences: (0, 1) and (2, 3); (f_2 = 2), because there are (2) valid sequences: (0, 2) and (1, 3); (f_3 = 3), because there are (3) valid sequences: (0, 3), (1, 2), and (2, 1). The values of (g_x) are as follows: (g_0 = f_0 \cdot 2^0 = 2 \cdot 2^0 = 2); $$$g_1 = f_1 \cdot 2^1 = |
| Neowise Labs Contest 1 (Codeforces Round 1018, Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 316287605 | ABCaCaCa_ | H | April 19, 2025, 4:31 p.m. | OK | C++17 (GCC 7-32) | TESTS | 18 | 312 | 6041600 | ||
| 316294006 | getawronganswer | H | April 19, 2025, 5:28 p.m. | OK | C++17 (GCC 7-32) | TESTS | 18 | 452 | 44236800 | ||
| 316275154 | heuristica | H | April 19, 2025, 3:54 p.m. | OK | C++17 (GCC 7-32) | TESTS | 18 | 1109 | 2150400 | ||
| 316278669 | LegendaryGrandmasterLjm | H | April 19, 2025, 4:04 p.m. | OK | C++17 (GCC 7-32) | TESTS | 18 | 1265 | 5632000 | ||
| 316280775 | zlt_tcl | H | April 19, 2025, 4:11 p.m. | OK | C++17 (GCC 7-32) | TESTS | 18 | 1327 | 5632000 | ||
| 316319654 | nullptr_qwq | H | April 19, 2025, 11:36 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 156 | 6041600 | ||
| 316285486 | mtsd | H | April 19, 2025, 4:25 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 171 | 102400 | ||
| 316275626 | BurnedChicken | H | April 19, 2025, 3:55 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 203 | 102400 | ||
| 316306347 | The_Hallak | H | April 19, 2025, 7:28 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 296 | 2764800 | ||
| 316304157 | jeroenodb | H | April 19, 2025, 7:03 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 296 | 2764800 | ||
| 316308754 | Karuna | H | April 19, 2025, 7:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 499 | 41062400 | ||
| 316287356 | ORzyzRO | H | April 19, 2025, 4:30 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 561 | 16384000 | ||
| 316287788 | wtc | H | April 19, 2025, 4:32 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 577 | 0 | ||
| 316273813 | -Typhon- | H | April 19, 2025, 3:50 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 671 | 5324800 | ||
| 316278881 | _istil | H | April 19, 2025, 4:05 p.m. | OK | C++20 (GCC 13-64) | TESTS | 18 | 702 | 5324800 | ||
| 316324619 | A_G | H | April 20, 2025, 2 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 140 | 204800 | ||
| 316276452 | risujiroh | H | April 19, 2025, 3:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 156 | 204800 | ||
| 316305109 | aaryaibtedafoyez | H | April 19, 2025, 7:14 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 156 | 6041600 | ||
| 316292228 | ecnerwala | H | April 19, 2025, 5:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 186 | 102400 | ||
| 316275803 | tko919 | H | April 19, 2025, 3:56 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 186 | 409600 | ||
| 316291703 | beaaaan | H | April 19, 2025, 5:13 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 186 | 716800 | ||
| 316273398 | tute7627 | H | April 19, 2025, 3:49 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 202 | 204800 | ||
| 316294187 | Benq | H | April 19, 2025, 5:30 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 233 | 1228800 | ||
| 316310459 | abezr88 | H | April 19, 2025, 8:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 250 | 2867200 | ||
| 316313265 | kaka_haha | H | April 19, 2025, 9:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 18 | 265 | 2252800 | ||
| 316294343 | rainboy | H | April 19, 2025, 5:31 p.m. | OK | GNU C11 | TESTS | 18 | 264 | 11161600 |
Back to search problems