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 |
|---|---|---|---|---|---|---|
| 2025 | Educational Codeforces Round 170 (Rated for Div. 2) | FINISHED | False | 7200 | 47489123 | Oct. 14, 2024, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 7835 ) | D | Attribute Checks | PROGRAMMING | brute force data structures dp implementation math |
Imagine a game where you play as a character that has two attributes: "Strength" and "Intelligence", that are at zero level initially. During the game, you'll acquire (m) attribute points that allow you to increase your attribute levels — one point will increase one of the attributes by one level. But sometimes, you'll encounter a so-called "Attribute Checks": if your corresponding attribute is high enough, you'll pass it; otherwise, you'll fail it. Spending some time, you finally prepared a list which contains records of all points you got and all checks you've met. And now you're wondering: what is the maximum number of attribute checks you can pass in a single run if you'd spend points wisely? Note that you can't change the order of records. The first line contains two integers (n) and (m) ((1 \le m \le 5000); (m < n \le 2 \cdot 10^6)) — the number of records in the list and the total number of points you'll get during the game. The second line contains (n) integers (r_1, r_2, \dots, r_n) ((-m \le r_i \le m)), where (r_i) encodes the (i)-th record: If (r_i = 0), then the (i)-th record is an acquiring one attribute point. You can spend to level up either Strength or Intelligence; If (r_i > 0), then it's an Intelligence check: if your Intelligence level is greater than or equal to (|r_i|), you pass. If (r_i < 0), then it's a Strength check: if your Strength level is greater than or equal to (|r_i|), you pass. Additional constraint on the input: the sequence (r_1, r_2, \dots, r_n) contains exactly (m) elements equal to (0). Print one integer — the maximum number of checks you can pass. In the first test, it's optimal to spend each point in Strength, so you'll fail (2) Intelligence checks but pass (3) Strength checks. In the second test, you'll fail both checks, since the first point you get comes after the checks. In the third test, one of the optimal strategies is: spend t |
| Educational Codeforces Round 170 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 285994671 | jianyu0922 | D | Oct. 15, 2024, 5:53 a.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 156 | 25190400 | ||
| 285984647 | dkdk | D | Oct. 15, 2024, 4:24 a.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 280 | 17203200 | ||
| 285973438 | nxynb | D | Oct. 15, 2024, 1:32 a.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 406 | 102400 | ||
| 285975629 | Muhammad_Aneeq | D | Oct. 15, 2024, 2:15 a.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 421 | 102400 | ||
| 285970907 | MODDI | D | Oct. 15, 2024, 12:39 a.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 421 | 4403200 | ||
| 285943943 | Lekhagar | D | Oct. 14, 2024, 6:03 p.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 436 | 4403200 | ||
| 285933956 | Dream_of_Glory | D | Oct. 14, 2024, 4:57 p.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 436 | 24166400 | ||
| 285983973 | Faisal-Saqib | D | Oct. 15, 2024, 4:15 a.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 437 | 102400 | ||
| 285942394 | LowPill | D | Oct. 14, 2024, 5:52 p.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 437 | 4403200 | ||
| 285971343 | maxlevel_youmu | D | Oct. 15, 2024, 12:48 a.m. | OK | C++17 (GCC 7-32) | TESTS | 26 | 437 | 8089600 | ||
| 285927180 | forever2023 | D | Oct. 14, 2024, 4:32 p.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 124 | 25190400 | ||
| 285976574 | Saton. | D | Oct. 15, 2024, 2:32 a.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 328 | 102400 | ||
| 285968141 | EduardoBrito | D | Oct. 14, 2024, 11:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 328 | 102400 | ||
| 285930426 | zlt_tcl | D | Oct. 14, 2024, 4:40 p.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 328 | 102400 | ||
| 285980225 | hyxawa | D | Oct. 15, 2024, 3:26 a.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 328 | 8089600 | ||
| 285972349 | Luozhiming2201 | D | Oct. 15, 2024, 1:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 328 | 12083200 | ||
| 285943491 | CChord | D | Oct. 14, 2024, 6 p.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 342 | 102400 | ||
| 285983414 | FXY_AC | D | Oct. 15, 2024, 4:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 343 | 102400 | ||
| 285976846 | Saton. | D | Oct. 15, 2024, 2:37 a.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 343 | 102400 | ||
| 285968849 | ntKhai384 | D | Oct. 14, 2024, 11:35 p.m. | OK | C++20 (GCC 13-64) | TESTS | 26 | 343 | 102400 | ||
| 285955266 | Roma_the_king | D | Oct. 14, 2024, 7:40 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 343 | 102400 | ||
| 285955132 | Roma_the_king | D | Oct. 14, 2024, 7:39 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 358 | 102400 | ||
| 285953600 | M0N | D | Oct. 14, 2024, 7:23 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 358 | 102400 | ||
| 285929713 | rippleflower | D | Oct. 14, 2024, 4:38 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 358 | 102400 | ||
| 285926396 | rgrgtgrf | D | Oct. 14, 2024, 4:30 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 359 | 102400 | ||
| 285968246 | nuyoah007 | D | Oct. 14, 2024, 11:19 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 359 | 4505600 | ||
| 285982685 | UtroYAKQ | D | Oct. 15, 2024, 4 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 359 | 8192000 | ||
| 285974241 | milet | D | Oct. 15, 2024, 1:49 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 374 | 102400 | ||
| 285973271 | CSteve_Paul | D | Oct. 15, 2024, 1:28 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 374 | 8089600 | ||
| 285994675 | Abraxos | D | Oct. 15, 2024, 5:53 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 26 | 375 | 24064000 | ||
| 285924940 | rainboy | D | Oct. 14, 2024, 4:28 p.m. | OK | GNU C11 | TESTS | 26 | 374 | 102400 | ||
| 285981030 | enikolov | D | Oct. 15, 2024, 3:37 a.m. | OK | Go | TESTS | 26 | 264 | 68710400 | ||
| 285947693 | daidao | D | Oct. 14, 2024, 6:30 p.m. | OK | Go | TESTS | 26 | 1061 | 22528000 | ||
| 285970237 | minibin | D | Oct. 15, 2024, 12:21 a.m. | OK | Java 21 | TESTS | 26 | 546 | 146739200 | ||
| 285957508 | sahasrad | D | Oct. 14, 2024, 8:05 p.m. | OK | Java 21 | TESTS | 26 | 1483 | 532275200 | ||
| 285954182 | sahasrad | D | Oct. 14, 2024, 7:29 p.m. | OK | Java 21 | TESTS | 26 | 1812 | 532275200 | ||
| 285964030 | vatsal_04 | D | Oct. 14, 2024, 9:36 p.m. | OK | Java 21 | TESTS | 26 | 1858 | 532377600 | ||
| 285931268 | hotkey | D | Oct. 14, 2024, 4:44 p.m. | OK | Kotlin 1.9 | TESTS | 26 | 1843 | 298291200 | ||
| 285927237 | chinesedfan | D | Oct. 14, 2024, 4:32 p.m. | OK | Node.js | TESTS | 26 | 1061 | 3891200 | ||
| 285986211 | BytesizeGenius | D | Oct. 15, 2024, 4:44 a.m. | OK | PyPy 3 | TESTS | 26 | 1718 | 130457600 | ||
| 285964594 | cecilia.chan | D | Oct. 14, 2024, 9:48 p.m. | OK | PyPy 3-64 | TESTS | 26 | 640 | 182374400 | ||
| 285959128 | deni1000 | D | Oct. 14, 2024, 8:23 p.m. | OK | PyPy 3-64 | TESTS | 26 | 655 | 227635200 | ||
| 285969820 | _Shifat_ | D | Oct. 15, 2024, 12:09 a.m. | OK | PyPy 3-64 | TESTS | 26 | 671 | 152780800 | ||
| 285959529 | deni1000 | D | Oct. 14, 2024, 8:28 p.m. | OK | PyPy 3-64 | TESTS | 26 | 703 | 227840000 | ||
| 285956796 | arpmipg | D | Oct. 14, 2024, 7:57 p.m. | OK | PyPy 3-64 | TESTS | 26 | 749 | 223436800 | ||
| 285966707 | SoleProprietor | D | Oct. 14, 2024, 10:38 p.m. | OK | PyPy 3-64 | TESTS | 26 | 796 | 223334400 | ||
| 285989092 | find | D | Oct. 15, 2024, 5:17 a.m. | OK | PyPy 3-64 | TESTS | 26 | 828 | 228761600 | ||
| 285924740 | Proelectro_Cpp | D | Oct. 14, 2024, 4:28 p.m. | OK | PyPy 3-64 | TESTS | 26 | 828 | 228966400 | ||
| 285976528 | edugong | D | Oct. 15, 2024, 2:31 a.m. | OK | PyPy 3-64 | TESTS | 26 | 843 | 227635200 | ||
| 285930149 | kyooz | D | Oct. 14, 2024, 4:39 p.m. | OK | PyPy 3-64 | TESTS | 26 | 859 | 185036800 | ||
| 285980654 | Spheniscine | D | Oct. 15, 2024, 3:32 a.m. | OK | Rust 2021 | TESTS | 26 | 296 | 102400 | ||
| 285975716 | Spheniscine | D | Oct. 15, 2024, 2:16 a.m. | OK | Rust 2021 | TESTS | 26 | 312 | 204800 | ||
| 285946176 | Cheshulko | D | Oct. 14, 2024, 6:19 p.m. | OK | Rust 2021 | TESTS | 26 | 453 | 203161600 | ||
| 285926431 | 123gjweq2 | D | Oct. 14, 2024, 4:31 p.m. | OK | Rust 2021 | TESTS | 26 | 530 | 48947200 |
Back to search problems