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 |
|---|---|---|---|---|---|---|
| 727 | Technocup 2017 - Elimination Round 1 (Unofficially Open for Everyone, Rated for Div. 2) | FINISHED | False | 7200 | 299969685 | Oct. 15, 2016, 9:05 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 955 ) | F | Polycarp's problems | PROGRAMMING | binary search dp greedy | 2300 |
Polycarp is an experienced participant in Codehorses programming contests. Now he wants to become a problemsetter. He sent to the coordinator a set of n problems. Each problem has it's quality, the quality of the i -th problem is a i ( a i can be positive, negative or equal to zero). The problems are ordered by expected difficulty, but the difficulty is not related to the quality in any way. The easiest problem has index 1 , the hardest problem has index n . The coordinator's mood is equal to q now. After reading a problem, the mood changes by it's quality. It means that after the coordinator reads a problem with quality b , the value b is added to his mood. The coordinator always reads problems one by one from the easiest to the hardest, it's impossible to change the order of the problems. If after reading some problem the coordinator's mood becomes negative, he immediately stops reading and rejects the problemset. Polycarp wants to remove the minimum number of problems from his problemset to make the coordinator's mood non-negative at any moment of time. Polycarp is not sure about the current coordinator's mood, but he has m guesses "the current coordinator's mood q = b i ". For each of m guesses, find the minimum number of problems Polycarp needs to remove so that the coordinator's mood will always be greater or equal to 0 while he reads problems from the easiest of the remaining problems to the hardest. The first line of input contains two integers n and m ( 1 ≤ n ≤ 750 , 1 ≤ m ≤ 200 000 ) — the number of problems in the problemset and the number of guesses about the current coordinator's mood. The second line of input contains n integers a 1 , a 2 , ..., a n ( - 10 9 ≤ a i ≤ 10 9 ) — the qualities of the problems in order of increasing difficulty. The third line of input contains m integers b 1 , b 2 , ..., b m ( 0 ≤ b i ≤ 10 15 ) — the guesses of the current coordinator's mood q . Print m lines, in i -th line print single integer — the answer to the |
| Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 21456618 | lesly | F | Oct. 15, 2016, 12:09 p.m. | OK | FPC | TESTS | 89 | 717 | 6246400 | 2300 | |
| 21453787 | bzh | F | Oct. 15, 2016, 10:56 a.m. | OK | FPC | TESTS | 89 | 717 | 6246400 | 2300 | |
| 24631980 | Gray_58 | F | Feb. 13, 2017, 4:26 p.m. | OK | FPC | TESTS | 89 | 1325 | 3993600 | 2300 | |
| 21786010 | qwsin | F | Oct. 26, 2016, 3:28 a.m. | OK | GNU C++ | TESTS | 89 | 46 | 0 | 2300 | |
| 21459163 | zhanglexing | F | Oct. 15, 2016, 1:54 p.m. | OK | GNU C++ | TESTS | 89 | 46 | 1945600 | 2300 | |
| 34211427 | _SHENZHEBEI_ | F | Jan. 16, 2018, 3:01 a.m. | OK | GNU C++ | TESTS | 89 | 46 | 4403200 | 2300 | |
| 40983399 | ReaLNero1 | F | July 30, 2018, 6:51 p.m. | OK | GNU C++ | TESTS | 89 | 62 | 0 | 2300 | |
| 30775378 | yhy | F | Sept. 27, 2017, 11:37 a.m. | OK | GNU C++ | TESTS | 89 | 62 | 4300800 | 2300 | |
| 35873851 | yukuai26 | F | March 3, 2018, 7:40 a.m. | OK | GNU C++ | TESTS | 89 | 62 | 46182400 | 2300 | |
| 35869365 | nn020701 | F | March 3, 2018, 5:49 a.m. | OK | GNU C++ | TESTS | 89 | 62 | 46387200 | 2300 | |
| 21638184 | Minology | F | Oct. 21, 2016, 9:58 a.m. | OK | GNU C++ | TESTS | 89 | 77 | 1638400 | 2300 | |
| 21588321 | imverypupil | F | Oct. 19, 2016, 10:21 a.m. | OK | GNU C++ | TESTS | 89 | 77 | 6451200 | 2300 | |
| 21474773 | hurshedabdullaev | F | Oct. 16, 2016, 8:37 a.m. | OK | GNU C++ | TESTS | 89 | 77 | 6656000 | 2300 | |
| 56676525 | rainboy | F | July 7, 2019, 3:47 p.m. | OK | GNU C11 | TESTS | 89 | 1107 | 0 | 2300 | |
| 64438757 | gn_wz | F | Nov. 7, 2019, 2:59 a.m. | OK | GNU C++11 | TESTS | 89 | 46 | 0 | 2300 | |
| 65412689 | jangjie | F | Nov. 20, 2019, 5:15 a.m. | OK | GNU C++11 | TESTS | 89 | 46 | 819200 | 2300 | |
| 25286564 | ShiroyashaGintoki | F | March 6, 2017, 8:45 a.m. | OK | GNU C++11 | TESTS | 89 | 46 | 6656000 | 2300 | |
| 45117710 | emoairx | F | Oct. 30, 2018, 11:33 p.m. | OK | GNU C++11 | TESTS | 89 | 46 | 12083200 | 2300 | |
| 51859525 | 550576898 | F | March 26, 2019, 12:34 p.m. | OK | GNU C++11 | TESTS | 89 | 46 | 16076800 | 2300 | |
| 35891010 | q234rty | F | March 3, 2018, 3:05 p.m. | OK | GNU C++11 | TESTS | 89 | 46 | 63283200 | 2300 | |
| 64609590 | luogu_bot1 | F | Nov. 9, 2019, 11:56 p.m. | OK | GNU C++11 | TESTS | 89 | 61 | 0 | 2300 | |
| 45077433 | emoairx | F | Oct. 30, 2018, 2:33 a.m. | OK | GNU C++11 | TESTS | 89 | 61 | 5222400 | 2300 | |
| 45189290 | yugao | F | Nov. 1, 2018, 11:47 p.m. | OK | GNU C++11 | TESTS | 89 | 62 | 102400 | 2300 | |
| 60465193 | luogu_bot1 | F | Sept. 13, 2019, 12:40 a.m. | OK | GNU C++11 | TESTS | 89 | 62 | 2252800 | 2300 | |
| 21604093 | aditya1495 | F | Oct. 19, 2016, 8:39 p.m. | OK | GNU C++14 | TESTS | 89 | 109 | 1945600 | 2300 | |
| 21458264 | dimas.kovas | F | Oct. 15, 2016, 1:15 p.m. | OK | GNU C++14 | TESTS | 89 | 109 | 1945600 | 2300 | |
| 49954595 | IceWiz | F | Feb. 15, 2019, 3:27 p.m. | OK | GNU C++14 | TESTS | 89 | 109 | 4915200 | 2300 | |
| 22613148 | snowy_smile | F | Nov. 30, 2016, 3 a.m. | OK | GNU C++14 | TESTS | 89 | 109 | 5120000 | 2300 | |
| 21455170 | I_Love_Tina | F | Oct. 15, 2016, 11:28 a.m. | OK | GNU C++14 | TESTS | 89 | 109 | 14540800 | 2300 | |
| 30283763 | gaporf | F | Sept. 12, 2017, 10:38 a.m. | OK | GNU C++14 | TESTS | 89 | 124 | 0 | 2300 | |
| 22215941 | frankbozar | F | Nov. 15, 2016, 2:45 a.m. | OK | GNU C++14 | TESTS | 89 | 124 | 3993600 | 2300 | |
| 22320409 | sslotin | F | Nov. 19, 2016, 7:19 a.m. | OK | GNU C++14 | TESTS | 89 | 124 | 4608000 | 2300 | |
| 22025393 | windy | F | Nov. 4, 2016, 2:03 a.m. | OK | GNU C++14 | TESTS | 89 | 124 | 5120000 | 2300 | |
| 34214616 | I_love_Y_UME | F | Jan. 16, 2018, 6:59 a.m. | OK | GNU C++14 | TESTS | 89 | 124 | 6758400 | 2300 | |
| 55292726 | hjk1030 | F | June 8, 2019, 8:26 a.m. | OK | GNU C++17 | TESTS | 89 | 109 | 8192000 | 2300 | |
| 40910884 | naitir | F | July 29, 2018, 8:45 a.m. | OK | GNU C++17 | TESTS | 89 | 124 | 0 | 2300 | |
| 57738454 | DataSailor | F | July 25, 2019, 10:41 a.m. | OK | GNU C++17 | TESTS | 89 | 124 | 819200 | 2300 | |
| 49673103 | aviroop123 | F | Feb. 9, 2019, 6:05 p.m. | OK | GNU C++17 | TESTS | 89 | 218 | 4812800 | 2300 | |
| 46416707 | Martin53 | F | Nov. 30, 2018, 7:41 p.m. | OK | GNU C++17 | TESTS | 89 | 280 | 5632000 | 2300 | |
| 52540038 | hugopm | F | April 9, 2019, 5:35 p.m. | OK | GNU C++17 | TESTS | 89 | 514 | 7168000 | 2300 | |
| 66809779 | UncleGrandpa | F | Dec. 14, 2019, 1:17 a.m. | OK | GNU C++17 | TESTS | 89 | 592 | 5632000 | 2300 | |
| 66643929 | upvoteme01 | F | Dec. 11, 2019, 3:53 p.m. | OK | GNU C++17 | TESTS | 89 | 592 | 5632000 | 2300 | |
| 67060710 | muoii | F | Dec. 17, 2019, 8:55 a.m. | OK | GNU C++17 | TESTS | 89 | 685 | 614400 | 2300 | |
| 61406643 | wadewlison | F | Sept. 28, 2019, 7:15 a.m. | OK | GNU C++17 | TESTS | 89 | 733 | 409600 | 2300 | |
| 21471383 | safarisoul | F | Oct. 16, 2016, 4:01 a.m. | OK | Java 8 | TESTS | 89 | 234 | 40345600 | 2300 | |
| 21453295 | Fcdkbear | F | Oct. 15, 2016, 10:51 a.m. | OK | Java 8 | TESTS | 89 | 280 | 32153600 | 2300 | |
| 21471501 | safarisoul | F | Oct. 16, 2016, 4:17 a.m. | OK | Java 8 | TESTS | 89 | 296 | 31539200 | 2300 | |
| 21450535 | uwi | F | Oct. 15, 2016, 10:24 a.m. | OK | Java 8 | TESTS | 89 | 686 | 27750400 | 2300 | |
| 21493493 | Di735 | F | Oct. 16, 2016, 12:05 p.m. | OK | Java 8 | TESTS | 89 | 1278 | 40448000 | 2300 | |
| 21686518 | ffao | F | Oct. 22, 2016, 5:09 p.m. | OK | Java 8 | TESTS | 89 | 1356 | 9216000 | 2300 | |
| 21493860 | Di735 | F | Oct. 16, 2016, 12:10 p.m. | OK | Java 8 | TESTS | 89 | 1357 | 40550400 | 2300 | |
| 21493970 | Di735 | F | Oct. 16, 2016, 12:12 p.m. | OK | Java 8 | TESTS | 89 | 1497 | 40448000 | 2300 | |
| 21493303 | Di735 | F | Oct. 16, 2016, noon | OK | Java 8 | TESTS | 89 | 1513 | 40448000 | 2300 | |
| 56676526 | Dukkha | F | July 7, 2019, 3:47 p.m. | OK | Java 8 | TESTS | 89 | 1731 | 0 | 2300 | |
| 69404444 | Spheniscine | F | Jan. 23, 2020, 10:19 a.m. | OK | Kotlin | TESTS | 89 | 936 | 15360000 | 2300 | |
| 69404073 | Spheniscine | F | Jan. 23, 2020, 10:11 a.m. | OK | Kotlin | TESTS | 89 | 1294 | 15360000 | 2300 | |
| 21500204 | azukun | F | Oct. 16, 2016, 3:18 p.m. | OK | MS C# | TESTS | 89 | 249 | 49766400 | 2300 | |
| 22271998 | AnatolyTolstobrov | F | Nov. 16, 2016, 3:59 p.m. | OK | MS C# | TESTS | 89 | 1731 | 17203200 | 2300 | |
| 22083248 | Mosyagin | F | Nov. 6, 2016, 6:42 p.m. | OK | MS C++ | TESTS | 89 | 1466 | 4915200 | 2300 | |
| 40938874 | xiezichen | F | July 30, 2018, 7:39 a.m. | OK | MS C++ | TESTS | 89 | 1809 | 0 | 2300 |
Back to search problems