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 |
|---|---|---|---|---|---|---|
| 2268 | Codeforces Round 1124 (Div. 1) | FINISHED | False | 9000 | 746666 | Sept. 26, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 307 ) | E | Kia Kio and Tree of Life | PROGRAMMING | data structures fft math trees |
After unlocking the crystal terminal, Kia and Kio discovered the blueprint for the kingdom's forgotten heart: a digital Tree of Life, seeded by the array (a_1, a_2, \ldots, a_n). To restore its pulse, they had to weave every possible incarnation of the Tree together. For any continuous segment, Kia would gently select an index (i) to plant the root. Trusting her vision, Kio would carefully weave the branches of life — crafting the left subtree from the preceding segment (1, i-1) and the right subtree from the succeeding segment (i+1, n). Once a Tree of Life bloomed, its vital resonance, (f(\text{tree})), was defined by its bonds. If one were to sever any of the (n-1) delicate branches, the Tree would split into two disconnected halves, releasing an energy of (X+Y), where (X) and (Y) are the bitwise XOR sums of the array elements remaining in the first and second halves, respectively. The total power of the Tree, (f(\text{tree})), is the sum of these released energies across all (n-1) branches. Kia wanted to know the ultimate vital force they could awaken. Help them compute the total sum of (f(\text{tree})) across every valid Tree of Life born from their shared bond, modulo (998\,244\,353). 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 each test case contains a single integer (n) ((1 \le n \le 2\cdot10^5)) — the size of the array. The second line contains (n) integers (a_1,a_2,\ldots,a_n) ((0 \le a_i \lt 2^{18})). It is guaranteed that the sum of (n) over all test cases does not exceed (2\cdot10^5). For each test case, print a single integer — the total sum of (f(\text{tree})) across all valid Trees of Life, modulo (998\,244\,353). For the first test case, (n=2) and (a = 1,2). There are two valid trees that can be constru |
| 157140 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 392229105 | intjr | E | Sept. 26, 2026, 4:44 p.m. | OK | C++17 (GCC 7-32) | TESTS | 84 | 921 | 13107200 | ||
| 392210654 | DemberS06 | E | Sept. 26, 2026, 3:43 p.m. | OK | C++17 (GCC 7-32) | TESTS | 84 | 984 | 12595200 | ||
| 392233003 | quanjun | E | Sept. 26, 2026, 5 p.m. | OK | C++17 (GCC 7-32) | TESTS | 84 | 1250 | 12083200 | ||
| 392231654 | AK--I--RA | E | Sept. 26, 2026, 4:55 p.m. | OK | C++17 (GCC 7-32) | TESTS | 84 | 2296 | 18022400 | ||
| 392230964 | cowgoodsheep | E | Sept. 26, 2026, 4:52 p.m. | OK | C++17 (GCC 7-32) | TESTS | 84 | 2453 | 4812800 | ||
| 392228862 | jn_275 | E | Sept. 26, 2026, 4:43 p.m. | OK | C++20 (GCC 13-64) | TESTS | 84 | 484 | 7270400 | ||
| 392280621 | master_luo | E | Sept. 27, 2026, 4:12 a.m. | OK | C++20 (GCC 13-64) | TESTS | 87 | 500 | 10956800 | ||
| 392237367 | 123456789010111213141516 | E | Sept. 26, 2026, 5:30 p.m. | OK | C++20 (GCC 13-64) | TESTS | 84 | 609 | 7270400 | ||
| 392222700 | albertwangwm | E | Sept. 26, 2026, 4:20 p.m. | OK | C++20 (GCC 13-64) | TESTS | 84 | 625 | 14848000 | ||
| 392236265 | kotatsugame | E | Sept. 26, 2026, 5:22 p.m. | OK | C++20 (GCC 13-64) | TESTS | 84 | 734 | 13107200 | ||
| 392231641 | Goodloser | E | Sept. 26, 2026, 4:55 p.m. | OK | C++20 (GCC 13-64) | TESTS | 84 | 828 | 49971200 | ||
| 392216481 | __baozii__ | E | Sept. 26, 2026, 3:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 84 | 843 | 10752000 | ||
| 392212589 | Elysion | E | Sept. 26, 2026, 3:48 p.m. | OK | C++20 (GCC 13-64) | TESTS | 84 | 843 | 23040000 | ||
| 392284544 | gjlccc | E | Sept. 27, 2026, 5:20 a.m. | OK | C++20 (GCC 13-64) | TESTS | 87 | 937 | 9625600 | ||
| 392221475 | Ormlis | E | Sept. 26, 2026, 4:15 p.m. | OK | C++20 (GCC 13-64) | TESTS | 84 | 1109 | 12288000 | ||
| 392223498 | Maquia | E | Sept. 26, 2026, 4:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 84 | 500 | 5017600 | ||
| 392229336 | zltz4 | E | Sept. 26, 2026, 4:45 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 84 | 593 | 7475200 | ||
| 392276277 | ShangshangZhang | E | Sept. 27, 2026, 2:43 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 87 | 593 | 13107200 | ||
| 392283332 | macepag726 | E | Sept. 27, 2026, 5:02 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 87 | 656 | 11571200 | ||
| 392280492 | ecnerwala | E | Sept. 27, 2026, 4:09 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 87 | 703 | 17510400 | ||
| 392223972 | hodza | E | Sept. 26, 2026, 4:25 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 84 | 750 | 13004800 | ||
| 392227430 | zjy2008 | E | Sept. 26, 2026, 4:38 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 84 | 812 | 22118400 | ||
| 392232415 | SherlockHolmes007 | E | Sept. 26, 2026, 4:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 84 | 828 | 7577600 | ||
| 392221436 | onlyfanz | E | Sept. 26, 2026, 4:15 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 84 | 828 | 16588800 | ||
| 392224878 | risujiroh | E | Sept. 26, 2026, 4:28 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 84 | 875 | 8499200 | ||
| 392245018 | Sensity | E | Sept. 26, 2026, 6:37 p.m. | OK | Go | TESTS | 86 | 1890 | 45056000 | ||
| 392220961 | WaterBottlle | E | Sept. 26, 2026, 4:13 p.m. | OK | Java 21 | TESTS | 84 | 2484 | 9420800 | ||
| 392225500 | hardiknarang2509 | E | Sept. 26, 2026, 4:30 p.m. | OK | Java 21 | TESTS | 84 | 2968 | 19251200 | ||
| 392232587 | Kevin-27 | E | Sept. 26, 2026, 4:58 p.m. | OK | Rust 2024 | TESTS | 84 | 937 | 18739200 |
Back to search problems