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 |
|---|---|---|---|---|---|---|
| 2157 | Codeforces Round 1066 (Div. 1 + Div. 2) | FINISHED | False | 10800 | 12515123 | Nov. 23, 2025, 9:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 402 ) | G | Isaac's Queries | PROGRAMMING | brute force constructive algorithms dfs and similar divide and conquer greedy interactive math probabilities |
You have reached the final level of the popular roguelike game "Isaac's Keybindings". Instead of a boss, you encounter a shopkeeper who holds an hidden array of integers (a_1, a_2, \ldots, a_n), where (0 \leq a_i < 2^{30}) for each (i) in (1, n). It is guaranteed that the array is generated randomly , i.e., each (a_i) ((1 \leq i \leq n)) is an integer independently generated uniformly at random in ([0, 2^{30})), in all the tests excluding the example. Let (f(u, v) = a_u \oplus a_{u+1} \oplus \ldots \oplus a_v), where (\oplus) is the bitwise (XOR). You can ask queries of the following form: (? u v), with (1 \leq u \leq v \leq n). The answer to the query is: (-1), if (f(u, v) = 0); (\lfloor \log_2(f(u, v)) \rfloor) otherwise. Each query has a cost of (\frac{1}{v-u+1}) robocoins. On each test, you are given (300) robocoins in total to pass at most (30) test cases (that is, you can spend (10) robocoins on average for a single test case). If your balance ever becomes negative you lose. Note that your robocoin balance does not need to be an integer at any moment. Find the answer to all possible (\frac{n(n+1)}{2}) queries without losing. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 30)). The description of the test cases follows. The first line of each test case contains one integer (n) ((n = 3) or (n = 100)) — the length of the array (a_1, a_2, \ldots, a_n). It is guaranteed that the array is generated randomly in all the tests excluding the example. There are exactly (50) tests in this problem (including the example). The example has (t = 1) and (n = 3), and all the other tests have (t = 30) and (n = 100). Hacks are not allowed in this problem. For each test case, first read a single integer (n). If the integer you read is (-2), it means that the answ |
| Codeforces Round 1066 (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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 350350340 | Flamire | G | Nov. 23, 2025, 11:52 a.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 187 | 102400 | ||
| 350350736 | _paper_ | G | Nov. 23, 2025, 11:53 a.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 202 | 102400 | ||
| 350360929 | wutongchun | G | Nov. 23, 2025, 12:32 p.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 218 | 1024000 | ||
| 350423988 | xjx20099 | G | Nov. 24, 2025, 1:08 a.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 234 | 102400 | ||
| 350349866 | keisuke6 | G | Nov. 23, 2025, 11:50 a.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 249 | 0 | ||
| 350435970 | WilliamFranklin | G | Nov. 24, 2025, 4:40 a.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 265 | 102400 | ||
| 350356407 | Sai_t | G | Nov. 23, 2025, 12:16 p.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 265 | 307200 | ||
| 350426788 | liyouran | G | Nov. 24, 2025, 2:14 a.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 280 | 102400 | ||
| 350437575 | WilliamFranklin | G | Nov. 24, 2025, 5:08 a.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 296 | 102400 | ||
| 350437432 | WilliamFranklin | G | Nov. 24, 2025, 5:06 a.m. | OK | C++17 (GCC 7-32) | TESTS | 50 | 296 | 102400 | ||
| 350378518 | icecuber | G | Nov. 23, 2025, 2:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 156 | 0 | ||
| 350353064 | dsgrekova2 | G | Nov. 23, 2025, 12:02 p.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 171 | 0 | ||
| 350369115 | Mango2011 | G | Nov. 23, 2025, 1:48 p.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 171 | 102400 | ||
| 350356917 | sunkaihuan | G | Nov. 23, 2025, 12:17 p.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 171 | 102400 | ||
| 350352289 | shiomusubi496 | G | Nov. 23, 2025, 11:59 a.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 171 | 614400 | ||
| 350428440 | systemStart | G | Nov. 24, 2025, 2:47 a.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 171 | 1126400 | ||
| 350427868 | billf | G | Nov. 24, 2025, 2:35 a.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 186 | 102400 | ||
| 350356104 | NKheyuxiang | G | Nov. 23, 2025, 12:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 186 | 102400 | ||
| 350350089 | wangsiyuanZP | G | Nov. 23, 2025, 11:51 a.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 186 | 102400 | ||
| 350438038 | zjq123 | G | Nov. 24, 2025, 5:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 50 | 187 | 102400 | ||
| 350425148 | rubbishZ | G | Nov. 24, 2025, 1:38 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 140 | 102400 | ||
| 350424626 | lzm0107 | G | Nov. 24, 2025, 1:25 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 156 | 102400 | ||
| 350424201 | hhoppitree | G | Nov. 24, 2025, 1:14 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 171 | 0 | ||
| 350402525 | Boboge | G | Nov. 23, 2025, 6:30 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 171 | 0 | ||
| 350383382 | A_G | G | Nov. 23, 2025, 3:40 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 171 | 0 | ||
| 350411143 | dreamoon_love_AA | G | Nov. 23, 2025, 8:12 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 171 | 102400 | ||
| 350360668 | ta2ly.id | G | Nov. 23, 2025, 12:32 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 171 | 307200 | ||
| 350436430 | under_dragon | G | Nov. 24, 2025, 4:48 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 187 | 0 | ||
| 350421568 | _lgh_ | G | Nov. 23, 2025, 11:59 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 187 | 0 | ||
| 350439510 | modongtao | G | Nov. 24, 2025, 5:40 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 187 | 102400 | ||
| 350368758 | manchik | G | Nov. 23, 2025, 1:46 p.m. | OK | Go | TESTS | 50 | 546 | 716800 | ||
| 350372927 | toam | G | Nov. 23, 2025, 2:16 p.m. | OK | PyPy 3-64 | TESTS | 50 | 514 | 11161600 | ||
| 350373264 | toam | G | Nov. 23, 2025, 2:19 p.m. | OK | PyPy 3-64 | TESTS | 50 | 530 | 11366400 | ||
| 350388584 | golomb | G | Nov. 23, 2025, 4:26 p.m. | OK | PyPy 3-64 | TESTS | 50 | 546 | 10342400 | ||
| 350370130 | Ayis137 | G | Nov. 23, 2025, 1:55 p.m. | OK | PyPy 3-64 | TESTS | 50 | 671 | 11161600 | ||
| 350422945 | fermion5 | G | Nov. 24, 2025, 12:40 a.m. | OK | PyPy 3-64 | TESTS | 50 | 1124 | 10342400 | ||
| 350422904 | fermion5 | G | Nov. 24, 2025, 12:39 a.m. | OK | PyPy 3-64 | TESTS | 50 | 1140 | 10240000 | ||
| 350422897 | fermion5 | G | Nov. 24, 2025, 12:39 a.m. | OK | PyPy 3-64 | TESTS | 50 | 1531 | 10035200 | ||
| 350422776 | fermion5 | G | Nov. 24, 2025, 12:35 a.m. | OK | PyPy 3-64 | TESTS | 50 | 2234 | 10444800 | ||
| 350354068 | fermion5 | G | Nov. 23, 2025, 12:06 p.m. | OK | PyPy 3-64 | TESTS | 50 | 3999 | 9523200 | ||
| 350372325 | sansen | G | Nov. 23, 2025, 2:12 p.m. | OK | Rust 2021 | TESTS | 50 | 202 | 0 | ||
| 350370842 | Mon_ster | G | Nov. 23, 2025, 2:01 p.m. | OK | Rust 2024 | TESTS | 50 | 515 | 0 |
Back to search problems