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 |
---|---|---|---|---|---|---|
815 | Codeforces Round 419 (Div. 1) | FINISHED | False | 7200 | 239469863 | June 17, 2017, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 2734 ) | C | Karen and Supermarket | PROGRAMMING | brute force dp trees | 2500 |
B'On the way home, Karen decided to stop by the supermarket to buy some groceries. She needs to buy a lot of goods, but since she is a student her budget is still quite limited. In fact, she can only spend up to b dollars. The supermarket sells n goods. The i-th good can be bought for ci dollars. Of course, each good can only be bought once. Lately, the supermarket has been trying to increase its business. Karen, being a loyal customer, was given n coupons. If Karen purchases the i-th good, she can use the i-th coupon to decrease its price by di. Of course, a coupon cannot be used without buying the corresponding good. There is, however, a constraint with the coupons. For all i xe2 x80 x89 xe2 x89 xa5 xe2 x80 x892, in order to use the i-th coupon, Karen must also use the xi-th coupon (which may mean using even more coupons to satisfy the requirement for that coupon). Karen wants to know the following. What is the maximum number of goods she can buy, without exceeding her budget b? The first line of input contains two integers n and b (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109), the number of goods in the store and the amount of money Karen has, respectively. The next n lines describe the items. Specifically: Output a single integer on a line by itself, the number of different goods Karen can buy, without exceeding her budget. In the first test case, Karen can purchase the following 4 items: The total cost of these goods is 15, which falls within her budget. Note, for example, that she cannot use the coupon on the sixth item, because then she should have also used the fifth coupon to buy the fifth item, which she did not do here. In the second test case, Karen has enough money to use all the coupons and purchase everything. '... |
Codeforces Round #419 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
30694041 | toida12chu | C | Sept. 25, 2017, 2:56 a.m. | OK | FPC | TESTS | 92 | 187 | 202342400 | 2500 | |
28001858 | sagiri_ | C | June 24, 2017, 9:18 a.m. | OK | FPC | TESTS | 92 | 202 | 203366400 | 2500 | |
27881167 | flower | C | June 18, 2017, 9:17 a.m. | OK | GNU C++ | TESTS | 92 | 93 | 200908800 | 2500 | |
27872576 | hzt1 | C | June 17, 2017, 11:04 p.m. | OK | GNU C++ | TESTS | 92 | 108 | 202035200 | 2500 | |
28022645 | h10_is_our_green_sun | C | June 25, 2017, 1:08 p.m. | OK | GNU C++ | TESTS | 92 | 109 | 203366400 | 2500 | |
27879348 | lsmll | C | June 18, 2017, 7:48 a.m. | OK | GNU C++ | TESTS | 92 | 109 | 289484800 | 2500 | |
29627574 | yic | C | Aug. 20, 2017, 6:07 p.m. | OK | GNU C++ | TESTS | 92 | 124 | 1331200 | 2500 | |
29627512 | vjudge3 | C | Aug. 20, 2017, 6:03 p.m. | OK | GNU C++ | TESTS | 92 | 124 | 1331200 | 2500 | |
27902269 | AkaneSasu | C | June 19, 2017, 10:33 a.m. | OK | GNU C++ | TESTS | 92 | 124 | 201216000 | 2500 | |
42107236 | tyler178 | C | Aug. 26, 2018, 2:18 a.m. | OK | GNU C++ | TESTS | 92 | 124 | 201318400 | 2500 | |
27923975 | huangzhen | C | June 20, 2017, 11:41 a.m. | OK | GNU C++ | TESTS | 92 | 124 | 201318400 | 2500 | |
41197668 | Scut82 | C | Aug. 4, 2018, 2:38 a.m. | OK | GNU C++ | TESTS | 92 | 124 | 201625600 | 2500 | |
68458707 | rainboy | C | Jan. 9, 2020, 5:16 p.m. | OK | GNU C11 | TESTS | 92 | 140 | 201011200 | 2500 | |
48697339 | Shimatsukaze | C | Jan. 21, 2019, 11:38 p.m. | OK | GNU C11 | TESTS | 92 | 373 | 402636800 | 2500 | |
45119690 | HeHere | C | Oct. 31, 2018, 2:51 a.m. | OK | GNU C++11 | TESTS | 92 | 78 | 200908800 | 2500 | |
51321505 | Gloid | C | March 15, 2019, 7:18 a.m. | OK | GNU C++11 | TESTS | 92 | 78 | 201625600 | 2500 | |
27856205 | geniucos | C | June 17, 2017, 3:23 p.m. | OK | GNU C++11 | TESTS | 92 | 93 | 201830400 | 2500 | |
28001341 | alex_Harry | C | June 24, 2017, 8:54 a.m. | OK | GNU C++11 | TESTS | 92 | 93 | 203468800 | 2500 | |
64914378 | gang_leader | C | Nov. 15, 2019, 2:55 a.m. | OK | GNU C++11 | TESTS | 92 | 108 | 201420800 | 2500 | |
50258746 | wet_water | C | Feb. 20, 2019, 9:34 p.m. | OK | GNU C++11 | TESTS | 92 | 108 | 201420800 | 2500 | |
27874346 | RNS3 | C | June 18, 2017, 2:06 a.m. | OK | GNU C++11 | TESTS | 92 | 108 | 205004800 | 2500 | |
27859017 | SirShokoladina | C | June 17, 2017, 3:43 p.m. | OK | GNU C++11 | TESTS | 92 | 109 | 819200 | 2500 | |
57302854 | clya2004 | C | July 19, 2019, 1:34 a.m. | OK | GNU C++11 | TESTS | 92 | 109 | 200908800 | 2500 | |
51567773 | KillerX | C | March 20, 2019, 10:26 a.m. | OK | GNU C++11 | TESTS | 92 | 109 | 200908800 | 2500 | |
27864102 | majk | C | June 17, 2017, 4:26 p.m. | OK | GNU C++14 | TESTS | 92 | 78 | 1740800 | 2500 | |
40980760 | ReaLNero1 | C | July 30, 2018, 5:41 p.m. | OK | GNU C++14 | TESTS | 92 | 93 | 1740800 | 2500 | |
48086706 | antguz | C | Jan. 8, 2019, 11:41 a.m. | OK | GNU C++14 | TESTS | 92 | 93 | 210739200 | 2500 | |
48086563 | antguz | C | Jan. 8, 2019, 11:37 a.m. | OK | GNU C++14 | TESTS | 92 | 93 | 315904000 | 2500 | |
27886291 | J_X | C | June 18, 2017, 2:28 p.m. | OK | GNU C++14 | TESTS | 92 | 108 | 201318400 | 2500 | |
64873249 | vjudge1 | C | Nov. 14, 2019, 8:55 a.m. | OK | GNU C++14 | TESTS | 92 | 108 | 201932800 | 2500 | |
27964745 | zstu_jack | C | June 22, 2017, 12:16 p.m. | OK | GNU C++14 | TESTS | 92 | 108 | 203571200 | 2500 | |
27861991 | apiadu | C | June 17, 2017, 4:08 p.m. | OK | GNU C++14 | TESTS | 92 | 109 | 201318400 | 2500 | |
27882758 | PengsenMao | C | June 18, 2017, 10:41 a.m. | OK | GNU C++14 | TESTS | 92 | 109 | 201318400 | 2500 | |
27854178 | subscriber | C | June 17, 2017, 3:10 p.m. | OK | GNU C++14 | TESTS | 92 | 109 | 201523200 | 2500 | |
51959347 | CMXRYNP | C | March 29, 2019, 5:48 a.m. | OK | GNU C++17 | TESTS | 92 | 93 | 201216000 | 2500 | |
42109063 | BackOnTrack | C | Aug. 26, 2018, 4:17 a.m. | OK | GNU C++17 | TESTS | 92 | 109 | 202649600 | 2500 | |
42109188 | BackOnTrack | C | Aug. 26, 2018, 4:24 a.m. | OK | GNU C++17 | TESTS | 92 | 109 | 202854400 | 2500 | |
51567744 | vjudge1 | C | March 20, 2019, 10:25 a.m. | OK | GNU C++17 | TESTS | 92 | 124 | 200908800 | 2500 | |
41901321 | swust4203 | C | Aug. 20, 2018, 12:17 p.m. | OK | GNU C++17 | TESTS | 92 | 139 | 201728000 | 2500 | |
51959780 | CMXRYNP | C | March 29, 2019, 6:06 a.m. | OK | GNU C++17 | TESTS | 92 | 140 | 201113600 | 2500 | |
66888709 | KevinWan | C | Dec. 14, 2019, 7:21 p.m. | OK | GNU C++17 | TESTS | 92 | 140 | 201216000 | 2500 | |
44442912 | suibaka | C | Oct. 17, 2018, 12:50 p.m. | OK | GNU C++17 | TESTS | 92 | 140 | 201318400 | 2500 | |
67612634 | NgodingTuApa | C | Dec. 25, 2019, 3:58 p.m. | OK | GNU C++17 | TESTS | 92 | 140 | 201523200 | 2500 | |
61600863 | vjudge5 | C | Oct. 1, 2019, 10:54 a.m. | OK | GNU C++17 | TESTS | 92 | 140 | 201932800 | 2500 | |
68458706 | Dukkha | C | Jan. 9, 2020, 5:16 p.m. | OK | Java 11 | TESTS | 92 | 670 | 263270400 | 2500 | |
27857047 | uwi | C | June 17, 2017, 3:29 p.m. | OK | Java 8 | TESTS | 92 | 358 | 137932800 | 2500 | |
27859203 | mmaxio | C | June 17, 2017, 3:45 p.m. | OK | Java 8 | TESTS | 92 | 529 | 267673600 | 2500 | |
28065436 | alekseev.aleksei | C | June 26, 2017, 10:23 p.m. | OK | Java 8 | TESTS | 92 | 608 | 22016000 | 2500 | |
48696934 | Shimatsukaze | C | Jan. 21, 2019, 10:50 p.m. | OK | Java 8 | TESTS | 92 | 794 | 489267200 | 2500 | |
30216120 | mualanhlung017 | C | Sept. 9, 2017, 2:47 a.m. | OK | Java 8 | TESTS | 92 | 795 | 473702400 | 2500 | |
30216004 | mualanhlung017 | C | Sept. 9, 2017, 2:38 a.m. | OK | Java 8 | TESTS | 92 | 841 | 473190400 | 2500 | |
27951193 | jfella | C | June 21, 2017, 6:40 p.m. | OK | Java 8 | TESTS | 92 | 841 | 551731200 | 2500 | |
32037074 | Carson | C | Nov. 3, 2017, 8:59 p.m. | OK | Java 8 | TESTS | 92 | 857 | 262656000 | 2500 | |
27861751 | Lewin | C | June 17, 2017, 4:06 p.m. | OK | Java 8 | TESTS | 92 | 888 | 466636800 | 2500 | |
27972926 | kubusgol | C | June 22, 2017, 8:54 p.m. | OK | Java 8 | TESTS | 92 | 920 | 495820800 | 2500 | |
27871509 | leign | C | June 17, 2017, 9:28 p.m. | OK | Mono C# | TESTS | 92 | 608 | 409804800 | 2500 | |
27858906 | camypaper | C | June 17, 2017, 3:42 p.m. | OK | MS C# | TESTS | 92 | 545 | 208691200 | 2500 | |
28006259 | RomeoFantastik | C | June 24, 2017, 1:40 p.m. | OK | MS C# | TESTS | 92 | 1232 | 419225600 | 2500 | |
57987388 | vjudge5 | C | July 30, 2019, 11:54 a.m. | OK | MS C++ | TESTS | 92 | 155 | 208896000 | 2500 | |
32130155 | AleksanderBalobanov | C | Nov. 7, 2017, 8:28 p.m. | OK | MS C++ | TESTS | 92 | 155 | 402841600 | 2500 | |
57897642 | bbisnouse | C | July 28, 2019, 2:16 p.m. | OK | MS C++ | TESTS | 92 | 156 | 201523200 | 2500 | |
57989121 | vjudge2 | C | July 30, 2019, 12:32 p.m. | OK | MS C++ | TESTS | 92 | 156 | 201523200 | 2500 | |
57978281 | vjudge2 | C | July 30, 2019, 8:26 a.m. | OK | MS C++ | TESTS | 92 | 156 | 208793600 | 2500 | |
57975282 | vjudge5 | C | July 30, 2019, 7:29 a.m. | OK | MS C++ | TESTS | 92 | 170 | 201523200 | 2500 | |
58980021 | vjudge3 | C | Aug. 18, 2019, 3:43 a.m. | OK | MS C++ | TESTS | 92 | 171 | 201523200 | 2500 | |
57975154 | vjudge2 | C | July 30, 2019, 7:26 a.m. | OK | MS C++ | TESTS | 92 | 171 | 201523200 | 2500 | |
57983968 | vjudge5 | C | July 30, 2019, 10:34 a.m. | OK | MS C++ | TESTS | 92 | 171 | 208793600 | 2500 | |
57979141 | vjudge4 | C | July 30, 2019, 8:43 a.m. | OK | MS C++ | TESTS | 92 | 171 | 208793600 | 2500 | |
57975978 | vjudge5 | C | July 30, 2019, 7:43 a.m. | OK | MS C++ 2017 | TESTS | 92 | 156 | 201625600 | 2500 |
Back to search problems