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 |
|---|---|---|---|---|---|---|
| 2255 | Codeforces Round 1116 (Div. 1) | FINISHED | False | 9000 | 2820275 | Aug. 9, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 197 ) | E2 | What Will Remain at the End? (Hard Version) | PROGRAMMING | data structures |
This is the hard version of the problem. The only difference between the two versions is the set of allowed values for the initial array and for (x) in operations of type (1). In this version, these values can be any integers in (-10^9, 10^9). You can make hacks only if both versions of the problem are solved. Before her final sortie, Chtholly asks Willem three questions. The second is this: what will remain if the sky truly reaches its end? Willem cannot answer her directly. Instead, he opens a chronicle containing (n) records, numbered from (1) to (n). Each record holds an integer: a positive value represents hope, while a negative value represents despair. The initial contents of the chronicle form an array (a_1,a_2,\ldots,a_n), called version (0). Chtholly then performs (q) operations. For each (1\le i\le q), the (i)-th operation creates a new version (i) from version (i-1). Each operation has one of the following four types: (1 l r x): set (a_k\gets x) for every (l\le k\le r). (2 l r): set (a_k\gets -a_k) for every (l\le k\le r). (3 l r): set (a_k\gets\max(a_k,0)) for every (l\le k\le r). (4 p): consider the value at position (p) in every previous version (0,1,\ldots, i-1). Let these values be (b_0,b_1,\ldots,b_{i-1}). Find the maximum sum over all non-empty subarrays(^{\text{∗}}) of this sequence. If the operation is of type (1), (2), or (3), the specified modification is applied to version (i-1) to obtain version (i). An operation of type (4) does not modify the array, so version (i) is identical to version (i-1). The operations are encoded and must be processed in order. Their decoding depends on (\mathrm{lastans}), which is updated after every operation of type (4). Help Willem answer every operation of type (4). (^{\text{∗}})An array (c) is a subarray |
| 155840 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 386383112 | dyzets | E2 | Aug. 9, 2026, 4:07 p.m. | OK | C++17 (GCC 7-32) | TESTS | 114 | 2640 | 244531200 | ||
| 386403864 | milky0002 | E2 | Aug. 9, 2026, 5:52 p.m. | OK | C++17 (GCC 7-32) | TESTS | 114 | 2703 | 92262400 | ||
| 386402727 | MarieBiskoot | E2 | Aug. 9, 2026, 5:41 p.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 1093 | 170803200 | ||
| 386429667 | gopal.thecoder | E2 | Aug. 10, 2026, 2:52 a.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 1218 | 148377600 | ||
| 386426841 | zeroliebe | E2 | Aug. 10, 2026, 1:56 a.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 1265 | 148377600 | ||
| 386414185 | aiunittest | E2 | Aug. 9, 2026, 8:03 p.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 1500 | 224665600 | ||
| 386423452 | szsyhh | E2 | Aug. 10, 2026, 12:26 a.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 1609 | 104243200 | ||
| 386425443 | tickcross.y | E2 | Aug. 10, 2026, 1:26 a.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 1609 | 197427200 | ||
| 386423852 | low_cortisol | E2 | Aug. 10, 2026, 12:40 a.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 1703 | 176537600 | ||
| 386431665 | masy2011 | E2 | Aug. 10, 2026, 3:30 a.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 1796 | 252723200 | ||
| 386440044 | nullptr_qwq | E2 | Aug. 10, 2026, 5:53 a.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 1906 | 258560000 | ||
| 386392589 | Asakizz | E2 | Aug. 9, 2026, 4:39 p.m. | OK | C++20 (GCC 13-64) | TESTS | 114 | 2000 | 104243200 | ||
| 386425469 | paulzrm | E2 | Aug. 10, 2026, 1:27 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 1062 | 109260800 | ||
| 386398986 | Emikooh | E2 | Aug. 9, 2026, 5:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 1421 | 84377600 | ||
| 386395098 | LCS-Dev | E2 | Aug. 9, 2026, 4:49 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 1421 | 95334400 | ||
| 386404347 | lgmpvhung | E2 | Aug. 9, 2026, 5:57 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 1859 | 63488000 | ||
| 386386030 | ecnerwala | E2 | Aug. 9, 2026, 4:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 1937 | 180633600 | ||
| 386398304 | lnlilkmvdlksa | E2 | Aug. 9, 2026, 5:01 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 1984 | 176640000 | ||
| 386411558 | basTestKeliye | E2 | Aug. 9, 2026, 7:21 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 1984 | 228761600 | ||
| 386397630 | StevenKnight | E2 | Aug. 9, 2026, 4:59 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 2000 | 150425600 | ||
| 386390374 | Milmon | E2 | Aug. 9, 2026, 4:30 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 2000 | 230502400 | ||
| 386397491 | gzyo4 | E2 | Aug. 9, 2026, 4:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 114 | 2062 | 60416000 | ||
| 386392562 | d11maan | E2 | Aug. 9, 2026, 4:39 p.m. | OK | Rust 2024 | TESTS | 114 | 1671 | 108441600 |
Back to search problems