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 |
|---|---|---|---|---|---|---|
| ( 105 ) | I2 | Affectionate Arrays (Hard Version) | PROGRAMMING | data structures dp graphs greedy math shortest paths two pointers |
Note that this statement is different to the version used in the official round. The statement has been corrected to a solvable version. In the official round, all submissions to this problem have been removed. This is the hard version of the problem. The difference between the versions is that in this version, you need to compute the sum of value of different 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! For a possible array (b_1, b_2, \ldots, b_m) satisfying all the conditions above, Victor defines the value of the array as the number of occurrences of array (a) as subsequences in array (b). That is, he counts the number of array (c_1, c_2, \ldots, c_{n}) that (1\le c_1< c_2< \ldots< c_n\le m) and for all integer (i) that (1\le i\le n), (b_{c_{i}}=a_i) is satisfied, and let this be the value of array (b). Even constrained as above, there are still too many possible gifts. So Victor |
| 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 298884919 | PEIMUDA | I2 | Dec. 28, 2024, 5:12 p.m. | OK | C++17 (GCC 7-32) | TESTS | 58 | 1186 | 93696000 | ||
| 298890734 | BurnedChicken | I2 | Dec. 28, 2024, 5:33 p.m. | OK | C++20 (GCC 13-64) | TESTS | 58 | 702 | 94003200 | ||
| 298894942 | maspy | I2 | Dec. 28, 2024, 6:33 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 671 | 185344000 | ||
| 298895421 | Petr | I2 | Dec. 28, 2024, 6:35 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 921 | 71270400 | ||
| 298898953 | Benq | I2 | Dec. 28, 2024, 7:08 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 1140 | 57958400 | ||
| 298896906 | jiangbowen | I2 | Dec. 28, 2024, 6:48 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 1218 | 134348800 | ||
| 298896881 | potato167 | I2 | Dec. 28, 2024, 6:47 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 1640 | 450457600 | ||
| 298894889 | potato167 | I2 | Dec. 28, 2024, 6:32 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 58 | 1750 | 450764800 |
Back to search problems