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 |
|---|---|---|---|---|---|---|
| 2248 | Codeforces Round 1113 (Div. 2) | FINISHED | False | 9000 | 2561084 | Aug. 1, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 146 ) | G | No Balance Left | PROGRAMMING | dp math |
Alisa has a shopping card with an initial balance of (h). There are (n) types of products in a supermarket. A product of type (i) costs (c_i), and Alisa can buy any number of products of each type. There are also (m) rebate activities. The (j)-th activity applies to a purchase if its total cost is at least (a_j) and gives a rebate of (b_j). For each purchase, Alisa performs the following operations: She chooses one or more products whose total cost (x) does not exceed the current balance on her card and pays (x) using the card. Among all rebate activities that apply to this purchase, the one with the largest rebate takes effect and its rebate is added to the card balance. If no rebate activity applies, no rebate is added. For every (h) from (1) to (s), determine whether Alisa can make the balance on her card equal to (0) after finitely many purchases. The first line contains three integers (n), (m), and (s) ((1 \le n, m, s \le 125\,000)) — the number of product types, the number of rebate activities, and the maximum initial balance to consider, respectively. The second line contains (n) integers (c_1, c_2, \ldots, c_n) ((1 \le c_i \le 125\,000)) — the price of a product of each type. The (i)-th of the next (m) lines contains two integers (a_i) and (b_i) ((1 \le a_i, b_i \le 125\,000)) — the spending threshold and the rebate of the (i)-th activity, respectively. It is guaranteed that (a_1 \lt a_2 \lt \cdots \lt a_m) and (b_1 \lt b_2 \lt \cdots \lt b_m). Print (s) lines. For each (i) ((1 \le i \le s)), print " YES " if Alisa can make the balance on her card equal to (0) when its initial balance is (i), and print " NO " otherwise. You can output the answer in any case (upper or lower). For example, the strings " yEs ", " yes ", " Yes ", and " YES " will be recognized as positive responses. In the first example, Alisa can make |
| Codeforces Round 1113 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 385190360 | test_code_force | G | Aug. 1, 2026, 5:38 p.m. | OK | C++17 (GCC 7-32) | TESTS | 51 | 546 | 102400 | ||
| 385202309 | Student9128 | G | Aug. 1, 2026, 7:46 p.m. | OK | C++17 (GCC 7-32) | TESTS | 51 | 640 | 2457600 | ||
| 385336044 | woyaobianshengle | G | Aug. 3, 2026, 2:34 a.m. | OK | C++17 (GCC 7-32) | TESTS | 51 | 734 | 102400 | ||
| 385325011 | therealdoug0986 | G | Aug. 2, 2026, 9:58 p.m. | OK | C++17 (GCC 7-32) | TESTS | 51 | 843 | 102400 | ||
| 385331344 | MusicBox | G | Aug. 3, 2026, 1:22 a.m. | OK | C++17 (GCC 7-32) | TESTS | 51 | 875 | 7270400 | ||
| 385291958 | ShulkerBox | G | Aug. 2, 2026, 3:20 p.m. | OK | C++17 (GCC 7-32) | TESTS | 51 | 1578 | 204800 | ||
| 385290033 | walizamanee | G | Aug. 2, 2026, 3 p.m. | OK | C++17 (GCC 7-32) | TESTS | 51 | 2046 | 5632000 | ||
| 385201435 | Student9128 | G | Aug. 1, 2026, 7:35 p.m. | OK | C++17 (GCC 7-32) | TESTS | 51 | 3484 | 3072000 | ||
| 385323312 | alize_koch213 | G | Aug. 2, 2026, 9:11 p.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 265 | 102400 | ||
| 385213599 | Asakizz | G | Aug. 1, 2026, 10:53 p.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 265 | 2355200 | ||
| 385193999 | CryptoQuant | G | Aug. 1, 2026, 6:09 p.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 578 | 4096000 | ||
| 385331410 | goodluck2026 | G | Aug. 3, 2026, 1:24 a.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 1031 | 5120000 | ||
| 385343141 | _QLe | G | Aug. 3, 2026, 3:57 a.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 1171 | 3072000 | ||
| 385314074 | sicmaduk | G | Aug. 2, 2026, 6:40 p.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 1359 | 102400 | ||
| 385330895 | goodluck2026 | G | Aug. 3, 2026, 1:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 1468 | 409600 | ||
| 385217419 | CuNO3 | G | Aug. 2, 2026, 1:39 a.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 1531 | 1433600 | ||
| 385325730 | Peter-007 | G | Aug. 2, 2026, 10:23 p.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 1578 | 102400 | ||
| 385341597 | dumb_god | G | Aug. 3, 2026, 3:39 a.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 1578 | 409600 | ||
| 385226585 | slcpp | G | Aug. 2, 2026, 4:49 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 51 | 93 | 1945600 | ||
| 385248452 | testingdududu | G | Aug. 2, 2026, 8:21 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 51 | 203 | 102400 | ||
| 385186540 | 2747 | G | Aug. 1, 2026, 5:03 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 218 | 102400 | ||
| 385289730 | dezhonger2 | G | Aug. 2, 2026, 2:58 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 51 | 296 | 102400 | ||
| 385264369 | fogboy | G | Aug. 2, 2026, 10:55 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 51 | 406 | 2355200 | ||
| 385263706 | fogboy | G | Aug. 2, 2026, 10:48 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 51 | 437 | 3584000 | ||
| 385218969 | asdfsdfs | G | Aug. 2, 2026, 2:24 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 51 | 468 | 307200 | ||
| 385234823 | nguyentuanxl | G | Aug. 2, 2026, 6:28 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 51 | 468 | 409600 | ||
| 385183659 | Milmon | G | Aug. 1, 2026, 4:54 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 50 | 593 | 102400 | ||
| 385263614 | fogboy | G | Aug. 2, 2026, 10:47 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 51 | 593 | 13619200 | ||
| 385245588 | lucasgoong | G | Aug. 2, 2026, 7:59 a.m. | OK | Java 8 | TESTS | 51 | 1203 | 0 | ||
| 385186899 | arvindf232 | G | Aug. 1, 2026, 5:04 p.m. | OK | Kotlin 1.7 | TESTS | 50 | 4671 | 11366400 | ||
| 385264894 | Snowfire | G | Aug. 2, 2026, 11 a.m. | OK | PyPy 3-64 | TESTS | 51 | 1937 | 42086400 | ||
| 385268221 | Snowfire | G | Aug. 2, 2026, 11:31 a.m. | OK | PyPy 3-64 | TESTS | 51 | 3640 | 41984000 | ||
| 385195376 | EliteCoder_77 | G | Aug. 1, 2026, 6:21 p.m. | OK | PyPy 3-64 | TESTS | 51 | 4484 | 31129600 | ||
| 385186222 | iamthehimansh | G | Aug. 1, 2026, 5:02 p.m. | OK | Python 3 | TESTS | 50 | 4640 | 18636800 | ||
| 385195228 | pigsoft.g | G | Aug. 1, 2026, 6:20 p.m. | OK | Rust 2024 | TESTS | 51 | 281 | 6144000 |
Back to search problems