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 |
|---|---|---|---|---|---|---|
| 1863 | Pinely Round 2 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 82999523 | Aug. 30, 2023, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 1345 ) | F | Divide, XOR, and Conquer | PROGRAMMING | bitmasks dp |
You are given an array of (n) integers (a_1, a_2, \ldots, a_n). In one operation you split the array into two parts: a non-empty prefix and a non-empty suffix. The value of each part is the bitwise XOR of all elements in it. Next, discard the part with the smaller value. If both parts have equal values, you can choose which one to discard. Replace the array with the remaining part. The operations are being performed until the length of the array becomes (1). For each (i) ((1 \le i \le n)), determine whether it is possible to achieve the state when only the (i)-th element (with respect to the original numbering) remains. Formally, you have two numbers (l) and (r), initially (l = 1) and (r = n). The current state of the array is (a_l, a_{l+1}, \ldots, a_r). As long as (l < r), you apply the following operation: Choose an arbitrary (k) from the set (\{l, l + 1, \ldots, r - 1\}). Denote (x = a_l \oplus a_{l + 1} \oplus \ldots \oplus a_k) and (y = a_{k + 1} \oplus a_{k + 2} \oplus \ldots \oplus a_{r}), where (\oplus) denotes the bitwise XOR operation. If (x < y), set (l = k + 1). If (x > y), set (r = k). If (x = y), either set (l = k + 1), or set (r = k). For each (i) ((1 \le i \le n)), determine whether it is possible to achieve (l = r = i). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10\,000)). The description of the test cases follows. The first line of each test case contains one integer (n) ((1 \le n \le 10\,000)). The second line of each test case contains (n) integers (a_1, a_2, \ldots, a_n) ((0 \le a_i < 2^{60})). It is guaranteed that the sum of (n) over all test cases does not exceed (10\,000). For each test case, output a single string of length (n) where the (i)-th element is equal to 1 if it is possible to achieve (l = r = i) and i |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 221224951 | llzer | F | Aug. 31, 2023, 6:01 a.m. | OK | GNU C++14 | TESTS | 41 | 358 | 307200 | ||
| 221217898 | QZJ114514 | F | Aug. 31, 2023, 4:06 a.m. | OK | GNU C++14 | TESTS | 41 | 405 | 307200 | ||
| 221176663 | anodarmc | F | Aug. 30, 2023, 5:27 p.m. | OK | GNU C++14 | TESTS | 41 | 405 | 307200 | ||
| 221214374 | edisnimorF | F | Aug. 31, 2023, 3:09 a.m. | OK | GNU C++14 | TESTS | 41 | 421 | 307200 | ||
| 221170313 | KevinYao | F | Aug. 30, 2023, 5:06 p.m. | OK | GNU C++14 | TESTS | 41 | 436 | 307200 | ||
| 221221032 | CLOCKS_PER_SEC | F | Aug. 31, 2023, 5:02 a.m. | OK | GNU C++14 | TESTS | 41 | 436 | 409600 | ||
| 221193278 | Abraham_Wu | F | Aug. 30, 2023, 8 p.m. | OK | GNU C++14 | TESTS | 41 | 452 | 409600 | ||
| 221184568 | AhmedEzzatG | F | Aug. 30, 2023, 6:26 p.m. | OK | GNU C++14 | TESTS | 41 | 483 | 13619200 | ||
| 221186533 | MCPlayer542 | F | Aug. 30, 2023, 6:43 p.m. | OK | GNU C++14 | TESTS | 41 | 514 | 12800000 | ||
| 221175354 | Sbak | F | Aug. 30, 2023, 5:23 p.m. | OK | GNU C++14 | TESTS | 41 | 529 | 13619200 | ||
| 221192359 | El3ageed_Abu_Shehab | F | Aug. 30, 2023, 7:48 p.m. | OK | GNU C++17 | TESTS | 41 | 358 | 307200 | ||
| 221208637 | pavlukivan | F | Aug. 31, 2023, 1:18 a.m. | OK | GNU C++17 | TESTS | 41 | 358 | 1740800 | ||
| 221173055 | Kochou_Shinobu | F | Aug. 30, 2023, 5:15 p.m. | OK | GNU C++17 | TESTS | 41 | 390 | 409600 | ||
| 221213807 | TrivialMan | F | Aug. 31, 2023, 2:59 a.m. | OK | GNU C++17 | TESTS | 41 | 421 | 307200 | ||
| 221185504 | chen_zexing | F | Aug. 30, 2023, 6:34 p.m. | OK | GNU C++17 | TESTS | 41 | 421 | 409600 | ||
| 221224114 | SDqwq | F | Aug. 31, 2023, 5:50 a.m. | OK | GNU C++17 | TESTS | 41 | 452 | 307200 | ||
| 221186689 | serotonin | F | Aug. 30, 2023, 6:45 p.m. | OK | GNU C++17 | TESTS | 41 | 452 | 307200 | ||
| 221216791 | NKheyuxiang | F | Aug. 31, 2023, 3:48 a.m. | OK | GNU C++17 | TESTS | 41 | 467 | 204800 | ||
| 221194407 | lucri | F | Aug. 30, 2023, 8:14 p.m. | OK | GNU C++17 | TESTS | 41 | 483 | 204800 | ||
| 221186142 | Rahil_Vahora | F | Aug. 30, 2023, 6:40 p.m. | OK | GNU C++17 | TESTS | 41 | 483 | 307200 | ||
| 221216841 | dengtingyu | F | Aug. 31, 2023, 3:49 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 218 | 3174400 | ||
| 221169692 | TheLostCookie | F | Aug. 30, 2023, 5:03 p.m. | OK | GNU C++17 (64) | TESTS | 41 | 234 | 307200 | ||
| 221212353 | yzz162534 | F | Aug. 31, 2023, 2:35 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 234 | 409600 | ||
| 221214082 | TheAshenWitch | F | Aug. 31, 2023, 3:04 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 234 | 614400 | ||
| 221193798 | eriksuenderhauf | F | Aug. 30, 2023, 8:06 p.m. | OK | GNU C++17 (64) | TESTS | 41 | 249 | 307200 | ||
| 221182739 | dlalswp25 | F | Aug. 30, 2023, 6:14 p.m. | OK | GNU C++17 (64) | TESTS | 41 | 249 | 409600 | ||
| 221215487 | bkifhr7 | F | Aug. 31, 2023, 3:27 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 280 | 6860800 | ||
| 221183449 | noimi | F | Aug. 30, 2023, 6:18 p.m. | OK | GNU C++17 (64) | TESTS | 41 | 327 | 14233600 | ||
| 221209032 | Crystally | F | Aug. 31, 2023, 1:28 a.m. | OK | GNU C++17 (64) | TESTS | 41 | 327 | 124313600 | ||
| 221171176 | nicksms | F | Aug. 30, 2023, 5:08 p.m. | OK | GNU C++17 (64) | TESTS | 41 | 358 | 307200 | ||
| 221171705 | gamegame | F | Aug. 30, 2023, 5:10 p.m. | OK | GNU C++20 (64) | TESTS | 41 | 46 | 307200 | ||
| 221192525 | I_LOVE_DASHA_KARPENKO | F | Aug. 30, 2023, 7:50 p.m. | OK | GNU C++20 (64) | TESTS | 41 | 109 | 409600 | ||
| 221177238 | qiuzx | F | Aug. 30, 2023, 5:29 p.m. | OK | GNU C++20 (64) | TESTS | 41 | 156 | 10137600 | ||
| 221212471 | platelet | F | Aug. 31, 2023, 2:37 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 202 | 307200 | ||
| 221217304 | neal | F | Aug. 31, 2023, 3:56 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 218 | 204800 | ||
| 221182214 | avi0000 | F | Aug. 30, 2023, 6:12 p.m. | OK | GNU C++20 (64) | TESTS | 41 | 218 | 204800 | ||
| 221172030 | 2018liuzhiyuan | F | Aug. 30, 2023, 5:11 p.m. | OK | GNU C++20 (64) | TESTS | 41 | 218 | 307200 | ||
| 221195467 | RED_INSIDE | F | Aug. 30, 2023, 8:31 p.m. | OK | GNU C++20 (64) | TESTS | 41 | 218 | 409600 | ||
| 221184851 | silxi | F | Aug. 30, 2023, 6:28 p.m. | OK | GNU C++20 (64) | TESTS | 41 | 218 | 409600 | ||
| 221209425 | lpo | F | Aug. 31, 2023, 1:35 a.m. | OK | GNU C++20 (64) | TESTS | 41 | 234 | 307200 | ||
| 221191925 | Egor | F | Aug. 30, 2023, 7:43 p.m. | OK | Rust 2021 | TESTS | 41 | 358 | 13926400 |
Back to search problems