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 |
|---|---|---|---|---|---|---|
| 2053 | Good Bye 2024: 2025 is NEAR | FINISHED | False | 10800 | 41009123 | Dec. 28, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 556 ) | I1 | Affectionate Arrays (Easy Version) | PROGRAMMING | dp greedy |
This is the easy version of the problem. The difference between the versions is that in this version, you need to compute the minimum length of the arrays. You can hack only if you solved all versions of this problem. Iris treasures an integer array (a_1, a_2, \ldots, a_n). She knows this array has an interesting property: the maximum absolute value of all elements is less than or equal to the sum of all elements, that is, (\max(\lvert a_i\rvert) \leq \sum a_i). Iris defines the boredom of an array as its maximum subarray(^{\text{∗}}) sum. Iris's birthday is coming, and Victor is going to send her another array (b_1, b_2, \ldots, b_m) as a gift. For some seemingly obvious reasons, he decides the array (b_1, b_2, \ldots, b_m) should have the following properties. (a_1, a_2, \ldots, a_n) should be a subsequence(^{\text{†}}) of (b_1, b_2, \ldots, b_m). The two arrays have the same sum. That is, (\sum\limits_{i=1}^n a_i = \sum\limits_{i=1}^m b_i). The boredom of (b_1, b_2, \ldots, b_m) is the smallest possible. Among the arrays with the smallest boredom, the length of the array (b) (i.e., (m)) is the smallest possible. And in this case, Iris will understand his regard as soon as possible! Even constrained as above, there are still too many possible gifts. So Victor asks you to compute the value of (\boldsymbol{m}) of any array (b_1, b_2, \ldots, b_m) satisfying all the conditions above. He promises you: if you help him successfully, he will share a bit of Iris's birthday cake with you. Note : since the input is large, you may need to optimize it for this problem. For example, in C++, it is enough to use the following lines at the start of the main() function: (^{\text{∗}})An array (c) is a subarray of an array (d) if (c) can be obtained from (d) by the deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. $$$^ |
| Good Bye 2024: 2025 is NEAR Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 298912811 | OIerGegu1019 | I1 | Dec. 29, 2024, 12:04 a.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 718 | 12083200 | ||
| 298913958 | DeadlyCritic | I1 | Dec. 29, 2024, 12:55 a.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 749 | 8294400 | ||
| 298889989 | hhjk | I1 | Dec. 28, 2024, 5:31 p.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 749 | 12083200 | ||
| 298882841 | a2bailey | I1 | Dec. 28, 2024, 5:05 p.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 827 | 8294400 | ||
| 298910352 | tfgs | I1 | Dec. 28, 2024, 10:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 827 | 20377600 | ||
| 298881310 | Potassium | I1 | Dec. 28, 2024, 4:59 p.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 843 | 20377600 | ||
| 298888205 | newbiecai | I1 | Dec. 28, 2024, 5:24 p.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 843 | 24064000 | ||
| 298887229 | junie | I1 | Dec. 28, 2024, 5:21 p.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 843 | 48128000 | ||
| 298880740 | Andrei_ierdnA | I1 | Dec. 28, 2024, 4:57 p.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 858 | 72192000 | ||
| 298881005 | Yurushia | I1 | Dec. 28, 2024, 4:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 859 | 24064000 | ||
| 298915998 | qiuzx | I1 | Dec. 29, 2024, 2:04 a.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 577 | 12083200 | ||
| 298898691 | b6e0 | I1 | Dec. 28, 2024, 7:05 p.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 577 | 26214400 | ||
| 298919211 | Revived_xryjr233 | I1 | Dec. 29, 2024, 3:31 a.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 578 | 36147200 | ||
| 298897052 | tonegawa | I1 | Dec. 28, 2024, 6:49 p.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 593 | 8294400 | ||
| 298883609 | F.R. | I1 | Dec. 28, 2024, 5:07 p.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 593 | 8294400 | ||
| 298875238 | SanguineChameleon | I1 | Dec. 28, 2024, 4:39 p.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 593 | 8294400 | ||
| 298918603 | LinkWish | I1 | Dec. 29, 2024, 3:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 593 | 12083200 | ||
| 298901705 | ttamx | I1 | Dec. 28, 2024, 7:43 p.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 608 | 20377600 | ||
| 298880173 | A_G | I1 | Dec. 28, 2024, 4:55 p.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 608 | 32358400 | ||
| 298879990 | siganai | I1 | Dec. 28, 2024, 4:54 p.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 609 | 8294400 | ||
| 298888927 | cmk666 | I1 | Dec. 28, 2024, 5:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 171 | 12595200 | ||
| 298875490 | jiangbowen | I1 | Dec. 28, 2024, 4:39 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 187 | 14028800 | ||
| 298881041 | w2y51c318 | I1 | Dec. 28, 2024, 4:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 203 | 26214400 | ||
| 298924188 | JoesSR | I1 | Dec. 29, 2024, 5:17 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 233 | 20480000 | ||
| 298913630 | LMeyling | I1 | Dec. 29, 2024, 12:40 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 592 | 20480000 | ||
| 298900781 | Kuroni | I1 | Dec. 28, 2024, 7:30 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 593 | 8396800 | ||
| 298888103 | orz | I1 | Dec. 28, 2024, 5:24 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 593 | 13107200 | ||
| 298902906 | 415411 | I1 | Dec. 28, 2024, 8:01 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 593 | 24166400 | ||
| 298901910 | yatharthsinghal1 | I1 | Dec. 28, 2024, 7:46 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 608 | 20480000 | ||
| 298880875 | nitram | I1 | Dec. 28, 2024, 4:57 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 609 | 20480000 | ||
| 298890869 | Gassa | I1 | Dec. 28, 2024, 5:33 p.m. | OK | D | TESTS | 58 | 1140 | 137625600 | ||
| 298887277 | Lilypad | I1 | Dec. 28, 2024, 5:21 p.m. | OK | Java 21 | TESTS | 58 | 1218 | 76800000 | ||
| 298885685 | SPD_9X2 | I1 | Dec. 28, 2024, 5:15 p.m. | OK | PyPy 3 | TESTS | 58 | 1405 | 292864000 | ||
| 298884194 | titia | I1 | Dec. 28, 2024, 5:09 p.m. | OK | PyPy 3-64 | TESTS | 58 | 983 | 446054400 | ||
| 298879231 | bronze_coder | I1 | Dec. 28, 2024, 4:52 p.m. | OK | PyPy 3-64 | TESTS | 58 | 1093 | 334028800 | ||
| 298882535 | teekaytai | I1 | Dec. 28, 2024, 5:03 p.m. | OK | PyPy 3-64 | TESTS | 58 | 1358 | 431616000 | ||
| 298879787 | Maksim1744 | I1 | Dec. 28, 2024, 4:54 p.m. | OK | Rust 2021 | TESTS | 58 | 187 | 20480000 |
Back to search problems