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 |
|---|---|---|---|---|---|---|
| 883 | 2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 267832523 | Oct. 21, 2017, 8:05 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 620 ) | J | Renovation | PROGRAMMING | greedy sortings | 2600 |
The mayor of the Berland city S sees the beauty differently than other city-dwellers. In particular, he does not understand at all, how antique houses can be nice-looking. So the mayor wants to demolish all ancient buildings in the city. The city S is going to host the football championship very soon. In order to make the city beautiful, every month the Berland government provides mayor a money tranche. The money has to be spent on ancient buildings renovation. There are n months before the championship and the i -th month tranche equals to a i burles. The city S has m antique buildings and the renovation cost of the j -th building is b j burles. The mayor has his own plans for spending the money. As he doesn't like antique buildings he wants to demolish as much of them as possible. For the j -th building he calculated its demolishing cost p j . The mayor decided to act according to the following plan. Each month he chooses several (possibly zero) of m buildings to demolish in such a way that renovation cost of each of them separately is not greater than the money tranche a i of this month ( b j ≤ a i ) — it will allow to deceive city-dwellers that exactly this building will be renovated. Then the mayor has to demolish all selected buildings during the current month as otherwise the dwellers will realize the deception and the plan will fail. Definitely the total demolishing cost can not exceed amount of money the mayor currently has. The mayor is not obliged to spend all the money on demolishing. If some money is left, the mayor puts it to the bank account and can use it in any subsequent month. Moreover, at any month he may choose not to demolish any buildings at all (in this case all the tranche will remain untouched and will be saved in the bank). Your task is to calculate the maximal number of buildings the mayor can demolish. The first line of the input contains two integers n and m (1 ≤ n , m ≤ 100 000) — the number of months before the championship |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 31561305 | apiadu yfzcsc 1919810 | J | Oct. 21, 2017, 9:21 a.m. | OK | GNU C++ | TESTS | 106 | 46 | 5734400 | 2600 | |
| 40979323 | ReaLNero1 | J | July 30, 2018, 5:01 p.m. | OK | GNU C++ | TESTS | 106 | 62 | 3584000 | 2600 | |
| 31626318 | zcyhhh | J | Oct. 23, 2017, 11:14 a.m. | OK | GNU C++ | TESTS | 106 | 62 | 6041600 | 2600 | |
| 31615283 | Scut82 | J | Oct. 22, 2017, 11:18 p.m. | OK | GNU C++ | TESTS | 106 | 77 | 8908800 | 2600 | |
| 31601455 | vjudge1 | J | Oct. 22, 2017, 11:08 a.m. | OK | GNU C++ | TESTS | 106 | 77 | 18329600 | 2600 | |
| 31601446 | Magolor | J | Oct. 22, 2017, 11:07 a.m. | OK | GNU C++ | TESTS | 106 | 77 | 18329600 | 2600 | |
| 31601394 | Magolor | J | Oct. 22, 2017, 11:05 a.m. | OK | GNU C++ | TESTS | 106 | 78 | 18329600 | 2600 | |
| 32074406 | Georgia_001 | J | Nov. 5, 2017, 11:16 a.m. | OK | GNU C++ | TESTS | 106 | 93 | 2252800 | 2600 | |
| 31592049 | zhangzy | J | Oct. 22, 2017, 5:13 a.m. | OK | GNU C++ | TESTS | 106 | 93 | 4403200 | 2600 | |
| 31566552 | zhangzy orbitingflea | J | Oct. 21, 2017, 10:40 a.m. | OK | GNU C++ | TESTS | 106 | 93 | 4403200 | 2600 | |
| 58387452 | amyandamy | J | Aug. 6, 2019, 12:29 p.m. | OK | GNU C++11 | TESTS | 106 | 46 | 3891200 | 2600 | |
| 59924003 | hankeke | J | Sept. 3, 2019, 2:16 a.m. | OK | GNU C++11 | TESTS | 106 | 46 | 4403200 | 2600 | |
| 31563198 | yanQval TLE choutii | J | Oct. 21, 2017, 9:48 a.m. | OK | GNU C++11 | TESTS | 106 | 46 | 6758400 | 2600 | |
| 43284160 | emoairx | J | Sept. 23, 2018, 7:20 a.m. | OK | GNU C++11 | TESTS | 106 | 62 | 2252800 | 2600 | |
| 31602738 | laofudasuan | J | Oct. 22, 2017, 11:56 a.m. | OK | GNU C++11 | TESTS | 106 | 62 | 6860800 | 2600 | |
| 31576118 | lzr_010506 | J | Oct. 21, 2017, 1:36 p.m. | OK | GNU C++11 | TESTS | 106 | 62 | 17920000 | 2600 | |
| 31574649 | lzr_010506 | J | Oct. 21, 2017, 12:58 p.m. | OK | GNU C++11 | TESTS | 106 | 62 | 17920000 | 2600 | |
| 31576576 | snowflake | J | Oct. 21, 2017, 1:53 p.m. | OK | GNU C++11 | TESTS | 106 | 62 | 20172800 | 2600 | |
| 31726767 | I_Love_Ginger | J | Oct. 26, 2017, 2:16 a.m. | OK | GNU C++11 | TESTS | 106 | 78 | 3481600 | 2600 | |
| 57872737 | lopare | J | July 28, 2019, 3:03 a.m. | OK | GNU C++11 | TESTS | 106 | 78 | 5529600 | 2600 | |
| 31567959 | rqgao2014 FizzyDavid ohweonfire | J | Oct. 21, 2017, 11:03 a.m. | OK | GNU C++14 | TESTS | 106 | 78 | 12902400 | 2600 | |
| 31592930 | nong | J | Oct. 22, 2017, 5:57 a.m. | OK | GNU C++14 | TESTS | 106 | 93 | 5120000 | 2600 | |
| 31797246 | mishobaxa1234 | J | Oct. 27, 2017, 1:37 p.m. | OK | GNU C++14 | TESTS | 106 | 109 | 2355200 | 2600 | |
| 31983796 | magieNoire | J | Nov. 2, 2017, 2:50 p.m. | OK | GNU C++14 | TESTS | 106 | 109 | 3379200 | 2600 | |
| 33328126 | blackcyz | J | Dec. 17, 2017, 4:24 a.m. | OK | GNU C++14 | TESTS | 106 | 109 | 4198400 | 2600 | |
| 31601239 | AFO_OFA | J | Oct. 22, 2017, 10:59 a.m. | OK | GNU C++14 | TESTS | 106 | 109 | 4198400 | 2600 | |
| 32080947 | Jester | J | Nov. 5, 2017, 4:50 p.m. | OK | GNU C++14 | TESTS | 106 | 109 | 5222400 | 2600 | |
| 32150042 | mjhun | J | Nov. 9, 2017, 2:52 a.m. | OK | GNU C++14 | TESTS | 106 | 109 | 5632000 | 2600 | |
| 32150012 | mjhun | J | Nov. 9, 2017, 2:49 a.m. | OK | GNU C++14 | TESTS | 106 | 109 | 5632000 | 2600 | |
| 31571181 | J.T.J.L. sfiction | J | Oct. 21, 2017, 11:59 a.m. | OK | GNU C++14 | TESTS | 106 | 109 | 5939200 | 2600 | |
| 58201113 | vjudge2 | J | Aug. 3, 2019, 4:19 a.m. | OK | GNU C++17 | TESTS | 106 | 109 | 2252800 | 2600 | |
| 56867178 | hjk1030 | J | July 12, 2019, 3:57 a.m. | OK | GNU C++17 | TESTS | 106 | 109 | 2252800 | 2600 | |
| 60522058 | _PortgasD.Ace_ | J | Sept. 14, 2019, 8:51 a.m. | OK | GNU C++17 | TESTS | 106 | 124 | 7475200 | 2600 | |
| 65314401 | Round_Dice m4h | J | Nov. 18, 2019, 4:38 p.m. | OK | GNU C++17 | TESTS | 106 | 124 | 8089600 | 2600 | |
| 60343939 | SGHD | J | Sept. 10, 2019, 11:54 a.m. | OK | GNU C++17 | TESTS | 106 | 139 | 8089600 | 2600 | |
| 37282641 | akaiNeko | J | April 13, 2018, 11:56 a.m. | OK | GNU C++17 | TESTS | 106 | 140 | 16588800 | 2600 | |
| 43010186 | customer101 | J | Sept. 17, 2018, 6:07 p.m. | OK | GNU C++17 | TESTS | 106 | 140 | 17612800 | 2600 | |
| 58201088 | hbi1998 | J | Aug. 3, 2019, 4:18 a.m. | OK | GNU C++17 | TESTS | 106 | 156 | 6144000 | 2600 | |
| 39129802 | yaksha | J | June 10, 2018, 6:53 p.m. | OK | GNU C++17 | TESTS | 106 | 171 | 10956800 | 2600 | |
| 69064028 | FlowerOfSorrow | J | Jan. 18, 2020, 5:49 p.m. | OK | GNU C++17 | TESTS | 106 | 202 | 16691200 | 2600 | |
| 31880783 | tmwilliamlin168 | J | Oct. 30, 2017, 3:55 a.m. | OK | Java 8 | TESTS | 106 | 233 | 12390400 | 2600 | |
| 33737112 | Tan1 | J | Dec. 28, 2017, 3:53 p.m. | OK | Java 8 | TESTS | 106 | 342 | 43929600 | 2600 | |
| 31714121 | AhmedSoliman | J | Oct. 25, 2017, 2:42 p.m. | OK | Java 8 | TESTS | 106 | 389 | 15872000 | 2600 | |
| 32782857 | 2158090 | J | Nov. 29, 2017, 2:14 p.m. | OK | Java 8 | TESTS | 106 | 389 | 37785600 | 2600 | |
| 31572776 | sas4eka jk_qq dalex | J | Oct. 21, 2017, 12:26 p.m. | OK | Java 8 | TESTS | 106 | 842 | 43520000 | 2600 | |
| 31626313 | AleksanderBalobanov | J | Oct. 23, 2017, 11:14 a.m. | OK | MS C++ | TESTS | 106 | 109 | 16384000 | 2600 | |
| 31566682 | lucyanna2018 | J | Oct. 21, 2017, 10:42 a.m. | OK | MS C++ | TESTS | 106 | 140 | 14540800 | 2600 | |
| 39223436 | nik1998 | J | June 13, 2018, 5:48 p.m. | OK | MS C++ | TESTS | 106 | 514 | 19660800 | 2600 | |
| 31609058 | LightRay | J | Oct. 22, 2017, 4:19 p.m. | OK | MS C++ | TESTS | 106 | 717 | 10137600 | 2600 |
Back to search problems