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 |
|---|---|---|---|---|---|---|
| 774 | VK Cup 2017 - Wild Card Round 1 | FINISHED | False | 7200 | 284999123 | April 5, 2017, 3:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 293 ) | B | Significant Cups | PROGRAMMING | *special binary search data structures two pointers | 2300 |
Stepan is a very experienced olympiad participant. He has n cups for Physics olympiads and m cups for Informatics olympiads. Each cup is characterized by two parameters — its significance c i and width w i . Stepan decided to expose some of his cups on a shelf with width d in such a way, that: there is at least one Physics cup and at least one Informatics cup on the shelf, the total width of the exposed cups does not exceed d , from each subjects (Physics and Informatics) some of the most significant cups are exposed (i. e. if a cup for some subject with significance x is exposed, then all the cups for this subject with significance greater than x must be exposed too). Your task is to determine the maximum possible total significance, which Stepan can get when he exposes cups on the shelf with width d , considering all the rules described above. The total significance is the sum of significances of all the exposed cups. The first line contains three integers n , m and d ( 1 ≤ n , m ≤ 100 000 , 1 ≤ d ≤ 10 9 ) — the number of cups for Physics olympiads, the number of cups for Informatics olympiads and the width of the shelf. Each of the following n lines contains two integers c i and w i ( 1 ≤ c i , w i ≤ 10 9 ) — significance and width of the i -th cup for Physics olympiads. Each of the following m lines contains two integers c j and w j ( 1 ≤ c j , w j ≤ 10 9 ) — significance and width of the j -th cup for Informatics olympiads. Print the maximum possible total significance, which Stepan can get exposing cups on the shelf with width d , considering all the rules described in the statement. If there is no way to expose cups on the shelf, then print 0 . In the first example Stepan has only one Informatics cup which must be exposed on the shelf. Its significance equals 3 and width equals 2 , so after Stepan exposes it, the width of free space on the shelf becomes equal to 6 . Also, Stepan must expose the second Physics cup (which has width 5 ), because it is |
| VK Cup 2017 — Уайлд-кард раунд 1 — Разбор |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 26154108 | Grzegorz jaguar1996 | B | April 5, 2017, 5:16 p.m. | OK | FPC | TESTS | 44 | 139 | 5632000 | 2300 | |
| 26155033 | Mem4ik RomanDerkach | B | April 5, 2017, 5:29 p.m. | OK | FPC | TESTS | 44 | 140 | 14540800 | 2300 | |
| 26152270 | samvel | B | April 5, 2017, 4:48 p.m. | OK | GNU C | TESTS | 44 | 109 | 6656000 | 2300 | |
| 26151466 | snek_Case sincerity | B | April 5, 2017, 4:38 p.m. | OK | GNU C11 | TESTS | 44 | 139 | 5120000 | 2300 | |
| 26245382 | oxidizer | B | April 10, 2017, 12:21 a.m. | OK | GNU C++11 | TESTS | 44 | 93 | 5324800 | 2300 | |
| 45205260 | genies | B | Nov. 2, 2018, 12:23 p.m. | OK | GNU C++11 | TESTS | 44 | 108 | 3174400 | 2300 | |
| 45205344 | genies | B | Nov. 2, 2018, 12:25 p.m. | OK | GNU C++11 | TESTS | 44 | 109 | 3174400 | 2300 | |
| 52670559 | cheetose | B | April 13, 2019, 7:16 a.m. | OK | GNU C++11 | TESTS | 44 | 109 | 3276800 | 2300 | |
| 26153445 | maximumSHOT Woodie | B | April 5, 2017, 5:06 p.m. | OK | GNU C++11 | TESTS | 44 | 124 | 6963200 | 2300 | |
| 26154312 | svetlana_lana GoldenMan | B | April 5, 2017, 5:19 p.m. | OK | GNU C++11 | TESTS | 44 | 124 | 7372800 | 2300 | |
| 26254974 | shijieyywd | B | April 10, 2017, 1:55 p.m. | OK | GNU C++11 | TESTS | 44 | 124 | 8499200 | 2300 | |
| 31879518 | daridius | B | Oct. 30, 2017, 1:26 a.m. | OK | GNU C++11 | TESTS | 44 | 249 | 3174400 | 2300 | |
| 26154241 | AntonZ thequickfox | B | April 5, 2017, 5:18 p.m. | OK | GNU C++11 | TESTS | 44 | 312 | 7884800 | 2300 | |
| 26151955 | mihaiI Djok216 | B | April 5, 2017, 4:45 p.m. | OK | GNU C++11 | TESTS | 44 | 374 | 5324800 | 2300 | |
| 34049575 | Linkus | B | Jan. 9, 2018, 1:28 p.m. | OK | GNU C++14 | TESTS | 44 | 31 | 3481600 | 2300 | |
| 27675248 | OMRailgun | B | June 8, 2017, 4:16 p.m. | OK | GNU C++14 | TESTS | 44 | 109 | 6451200 | 2300 | |
| 27872563 | -Morass- | B | June 17, 2017, 11:03 p.m. | OK | GNU C++14 | TESTS | 44 | 124 | 4198400 | 2300 | |
| 26151972 | Birjik Meirambek | B | April 5, 2017, 4:45 p.m. | OK | GNU C++14 | TESTS | 44 | 139 | 5120000 | 2300 | |
| 26153479 | equocredite Xpech | B | April 5, 2017, 5:07 p.m. | OK | GNU C++14 | TESTS | 44 | 139 | 5120000 | 2300 | |
| 54609901 | Nick_Brain | B | May 25, 2019, 10:55 a.m. | OK | GNU C++14 | TESTS | 44 | 140 | 5529600 | 2300 | |
| 66519816 | silxi | B | Dec. 8, 2019, 9:23 p.m. | OK | GNU C++14 | TESTS | 44 | 140 | 6860800 | 2300 | |
| 26152925 | NeKpoT DaniilF | B | April 5, 2017, 4:58 p.m. | OK | GNU C++14 | TESTS | 44 | 155 | 6758400 | 2300 | |
| 27668216 | gdymind | B | June 8, 2017, 9:53 a.m. | OK | GNU C++14 | TESTS | 44 | 156 | 3174400 | 2300 | |
| 35768465 | nevgen | B | Feb. 27, 2018, 4:08 p.m. | OK | GNU C++14 | TESTS | 44 | 171 | 6656000 | 2300 | |
| 51805525 | MOPKOBKA228 | B | March 24, 2019, 9:15 p.m. | OK | GNU C++17 | TESTS | 44 | 717 | 6451200 | 2300 | |
| 40982572 | ReaLNero1 | B | July 30, 2018, 6:28 p.m. | OK | Haskell | TESTS | 44 | 763 | 63180800 | 2300 | |
| 26174513 | haleyk100198 | B | April 6, 2017, 4:08 p.m. | OK | Haskell | TESTS | 44 | 826 | 108032000 | 2300 | |
| 36217367 | dmd161100 safiullinzufar | B | March 12, 2018, 7:58 a.m. | OK | Java 8 | TESTS | 44 | 326 | 27033600 | 2300 | |
| 26155427 | gars Provet | B | April 5, 2017, 5:33 p.m. | OK | Java 8 | TESTS | 44 | 452 | 35942400 | 2300 | |
| 26154496 | w4r10ck | B | April 5, 2017, 5:22 p.m. | OK | Java 8 | TESTS | 44 | 888 | 26828800 | 2300 | |
| 28488527 | KirillxIonov | B | July 13, 2017, 3:53 a.m. | OK | Java 8 | TESTS | 44 | 951 | 21094400 | 2300 | |
| 26154521 | f1u77y xlwinner11 | B | April 5, 2017, 5:22 p.m. | OK | Java 8 | TESTS | 44 | 998 | 21094400 | 2300 | |
| 26152947 | rassvetik godjan | B | April 5, 2017, 4:58 p.m. | OK | MS C# | TESTS | 44 | 311 | 19251200 | 2300 | |
| 26233411 | _ShadowSong | B | April 9, 2017, 9:05 a.m. | OK | MS C# | TESTS | 44 | 405 | 18432000 | 2300 | |
| 26153842 | VladGanzha ver1tas | B | April 5, 2017, 5:12 p.m. | OK | MS C++ | TESTS | 44 | 405 | 8499200 | 2300 | |
| 26539197 | AbdelkareemEmara | B | April 21, 2017, 2:02 p.m. | OK | MS C++ | TESTS | 44 | 405 | 10444800 | 2300 | |
| 26513256 | krijgertje | B | April 20, 2017, 10:45 a.m. | OK | PHP | TESTS | 44 | 1543 | 41164800 | 2300 | |
| 30307164 | mike_live | B | Sept. 13, 2017, 12:45 p.m. | OK | PHP | TESTS | 44 | 2495 | 98201600 | 2300 | |
| 26155340 | VernitaGreen svxf | B | April 5, 2017, 5:33 p.m. | OK | PyPy 3 | TESTS | 44 | 2604 | 49049600 | 2300 | |
| 26151161 | VernitaGreen svxf | B | April 5, 2017, 4:35 p.m. | OK | Python 3 | TESTS | 44 | 1278 | 30310400 | 2300 | |
| 26176893 | zetilovn | B | April 6, 2017, 6:08 p.m. | OK | Python 3 | TESTS | 44 | 1356 | 25702400 | 2300 |
Back to search problems