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 |
---|---|---|---|---|---|---|
1622 | Educational Codeforces Round 120 (Rated for Div. 2) | FINISHED | False | 7200 | 96650663 | Dec. 27, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 13502 ) | C | Set or Decrease | PROGRAMMING | binary search greedy ternary search |
B"You are given an integer array a_1, a_2, ... , a_n and integer k . In one step you can What is the minimum number of steps you need to make the sum of array sum limits_{i=1}^{n}{a_i} <= k ? (You are allowed to make values of array negative). The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains two integers n and k ( 1 <= n <= 2 cdot 10^5 ; 1 <= k <= 10^{15} ) -- the size of array a and upper bound on its sum. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- the array itself. It's guaranteed that the sum of n over all test cases doesn't exceed 2 cdot 10^5 . For each test case, print one integer -- the minimum number of steps to make sum limits_{i=1}^{n}{a_i} <= k . In the first test case, you should decrease a_1 10 times to get the sum lower or equal to k = 10 . In the second test case, the sum of array a is already less or equal to 69 , so you don't need to change it. In the third test case, you can, for example: In the fourth test case, you can, for example: "... |
Educational Codeforces Round 120 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
140840160 | eastnman | C | Dec. 27, 2021, 8:12 p.m. | OK | Delphi | TESTS | 7 | 93 | 3276800 | ||
140854189 | Chao_zi | C | Dec. 28, 2021, 3:59 a.m. | OK | GNU C++14 | TESTS | 7 | 30 | 3481600 | ||
140837794 | __simple__ | C | Dec. 27, 2021, 7:28 p.m. | OK | GNU C++14 | TESTS | 7 | 46 | 3174400 | ||
140855731 | kshounish02 | C | Dec. 28, 2021, 4:33 a.m. | OK | GNU C++14 | TESTS | 7 | 61 | 1638400 | ||
140832188 | The_Invisible_LGM | C | Dec. 27, 2021, 6:11 p.m. | OK | GNU C++14 | TESTS | 7 | 61 | 1638400 | ||
140825075 | PrafulSinghal | C | Dec. 27, 2021, 4:59 p.m. | OK | GNU C++14 | TESTS | 7 | 61 | 1638400 | ||
140825059 | 123ampagp | C | Dec. 27, 2021, 4:59 p.m. | OK | GNU C++14 | TESTS | 7 | 61 | 1638400 | ||
140859245 | vishal123verma | C | Dec. 28, 2021, 5:31 a.m. | OK | GNU C++14 | TESTS | 7 | 61 | 3174400 | ||
140857938 | W4H1 | C | Dec. 28, 2021, 5:11 a.m. | OK | GNU C++14 | TESTS | 7 | 61 | 3174400 | ||
140855488 | Moinak878 | C | Dec. 28, 2021, 4:27 a.m. | OK | GNU C++14 | TESTS | 7 | 61 | 3174400 | ||
140852875 | little_ge | C | Dec. 28, 2021, 3:30 a.m. | OK | GNU C++14 | TESTS | 7 | 61 | 3174400 | ||
140820254 | ak2312 | C | Dec. 27, 2021, 4:34 p.m. | OK | GNU C++17 | TESTS | 7 | 46 | 819200 | ||
140850519 | hello_codeforces | C | Dec. 28, 2021, 2:29 a.m. | OK | GNU C++17 | TESTS | 7 | 46 | 2457600 | ||
140837175 | Olympia | C | Dec. 27, 2021, 7:19 p.m. | OK | GNU C++17 | TESTS | 7 | 46 | 3174400 | ||
140845109 | stoober | C | Dec. 27, 2021, 10:30 p.m. | OK | GNU C++17 | TESTS | 7 | 61 | 819200 | ||
140857774 | etilletas_ | C | Dec. 28, 2021, 5:09 a.m. | OK | GNU C++17 | TESTS | 7 | 61 | 1638400 | ||
140853015 | athuljoseph | C | Dec. 28, 2021, 3:33 a.m. | OK | GNU C++17 | TESTS | 7 | 61 | 1638400 | ||
140850993 | learnnerdummy | C | Dec. 28, 2021, 2:42 a.m. | OK | GNU C++17 | TESTS | 7 | 61 | 1638400 | ||
140843046 | vibhug507 | C | Dec. 27, 2021, 9:22 p.m. | OK | GNU C++17 | TESTS | 7 | 61 | 1638400 | ||
140843022 | def_xyz | C | Dec. 27, 2021, 9:21 p.m. | OK | GNU C++17 | TESTS | 7 | 61 | 1638400 | ||
140831890 | Claeb101 | C | Dec. 27, 2021, 6:07 p.m. | OK | GNU C++17 | TESTS | 7 | 61 | 1638400 | ||
140842613 | Thallium54 | C | Dec. 27, 2021, 9:09 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 819200 | ||
140829356 | tom2003 | C | Dec. 27, 2021, 5:37 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 1638400 | ||
140853313 | avnish0900 | C | Dec. 28, 2021, 3:39 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 3174400 | ||
140833048 | Hyado | C | Dec. 27, 2021, 6:21 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 3174400 | ||
140825430 | yyds. | C | Dec. 27, 2021, 5:01 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 3174400 | ||
140843193 | Thallium54 | C | Dec. 27, 2021, 9:25 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 819200 | ||
140860817 | hithu | C | Dec. 28, 2021, 5:52 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 1638400 | ||
140859790 | Sl1ng-SHOT | C | Dec. 28, 2021, 5:38 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 1638400 | ||
140858314 | Kaichengxdd | C | Dec. 28, 2021, 5:17 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 1638400 | ||
140856126 | Omja | C | Dec. 28, 2021, 4:39 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 1638400 | ||
140828636 | Isshiki_Iroha_ | C | Dec. 27, 2021, 5:30 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 32563200 | ||
140828398 | Isshiki_Iroha_ | C | Dec. 27, 2021, 5:28 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 32563200 | ||
140847594 | bernborgess | C | Dec. 28, 2021, 12:36 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 819200 | ||
140836914 | matteojug | C | Dec. 27, 2021, 7:14 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 819200 | ||
140826190 | _OneMoreLight | C | Dec. 27, 2021, 5:07 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 819200 | ||
140822024 | IntoTheNight | C | Dec. 27, 2021, 4:39 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 819200 | ||
140860114 | wumbus | C | Dec. 28, 2021, 5:43 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 1638400 | ||
140859639 | Wassup | C | Dec. 28, 2021, 5:36 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 1638400 | ||
140853134 | Nero | C | Dec. 28, 2021, 3:36 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 1638400 | ||
140851247 | Hamed5001 | C | Dec. 28, 2021, 2:49 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 1638400 | ||
140855400 | pqhuy98 | C | Dec. 28, 2021, 4:26 a.m. | OK | Go | TESTS | 7 | 187 | 4915200 | ||
140840433 | prituladima | C | Dec. 27, 2021, 8:17 p.m. | OK | Java 11 | TESTS | 7 | 171 | 0 | ||
140841342 | long2142453426 | C | Dec. 27, 2021, 8:38 p.m. | OK | Java 11 | TESTS | 7 | 187 | 0 | ||
140840238 | prituladima | C | Dec. 27, 2021, 8:13 p.m. | OK | Java 11 | TESTS | 7 | 187 | 0 | ||
140825737 | aashay_03 | C | Dec. 27, 2021, 5:04 p.m. | OK | Java 11 | TESTS | 7 | 202 | 3379200 | ||
140843766 | mphillotry | C | Dec. 27, 2021, 9:43 p.m. | OK | Java 11 | TESTS | 7 | 218 | 4096000 | ||
140845253 | mareshkau | C | Dec. 27, 2021, 10:36 p.m. | OK | Java 11 | TESTS | 7 | 218 | 4915200 | ||
140830343 | BLET_KHAKIM | C | Dec. 27, 2021, 5:48 p.m. | OK | Java 11 | TESTS | 7 | 233 | 3891200 | ||
140826796 | shojin_pro | C | Dec. 27, 2021, 5:12 p.m. | OK | Java 11 | TESTS | 7 | 233 | 3891200 | ||
140836363 | gumbymoo | C | Dec. 27, 2021, 7:06 p.m. | OK | Java 11 | TESTS | 7 | 233 | 5017600 | ||
140858797 | mayank190801 | C | Dec. 28, 2021, 5:25 a.m. | OK | Java 11 | TESTS | 7 | 234 | 5017600 | ||
140824460 | I_love_camel_case | C | Dec. 27, 2021, 4:55 p.m. | OK | Java 8 | TESTS | 7 | 124 | 0 | ||
140848713 | alibaba | C | Dec. 28, 2021, 1:24 a.m. | OK | Java 8 | TESTS | 7 | 139 | 11776000 | ||
140859662 | Sachin_2961 | C | Dec. 28, 2021, 5:37 a.m. | OK | Java 8 | TESTS | 7 | 140 | 0 | ||
140834779 | NerfThis | C | Dec. 27, 2021, 6:44 p.m. | OK | Java 8 | TESTS | 7 | 155 | 12800000 | ||
140826338 | gssakash | C | Dec. 27, 2021, 5:09 p.m. | OK | Java 8 | TESTS | 7 | 170 | 13107200 | ||
140840543 | WrongAnswerOnTestCase2 | C | Dec. 27, 2021, 8:19 p.m. | OK | Java 8 | TESTS | 7 | 171 | 11776000 | ||
140860863 | Swapniltri | C | Dec. 28, 2021, 5:53 a.m. | OK | Java 8 | TESTS | 7 | 171 | 11878400 | ||
140844333 | sedenion | C | Dec. 27, 2021, 10 p.m. | OK | Java 8 | TESTS | 7 | 186 | 0 | ||
140830258 | NerfThis | C | Dec. 27, 2021, 5:47 p.m. | OK | Java 8 | TESTS | 7 | 186 | 12800000 | ||
140817577 | guru1603 | C | Dec. 27, 2021, 4:29 p.m. | OK | Java 8 | TESTS | 7 | 186 | 13107200 | ||
140833001 | _Astron | C | Dec. 27, 2021, 6:21 p.m. | OK | Kotlin 1.4 | TESTS | 7 | 217 | 16281600 | ||
140820559 | Krekep | C | Dec. 27, 2021, 4:34 p.m. | OK | MS C++ 2017 | TESTS | 7 | 187 | 1638400 | ||
140818539 | Damirca | C | Dec. 27, 2021, 4:31 p.m. | OK | MS C++ 2017 | TESTS | 7 | 187 | 2457600 | ||
140841679 | nik2005 | C | Dec. 27, 2021, 8:45 p.m. | OK | MS C++ 2017 | TESTS | 7 | 218 | 1638400 | ||
140818527 | nikuradze2006 | C | Dec. 27, 2021, 4:31 p.m. | OK | MS C++ 2017 | TESTS | 7 | 218 | 4812800 | ||
140840537 | JohnCode | C | Dec. 27, 2021, 8:19 p.m. | OK | MS C++ 2017 | TESTS | 7 | 233 | 1638400 | ||
140849119 | A_Pier | C | Dec. 28, 2021, 1:42 a.m. | OK | MS C++ 2017 | TESTS | 7 | 233 | 3174400 | ||
140832828 | AllDirections | C | Dec. 27, 2021, 6:19 p.m. | OK | MS C++ 2017 | TESTS | 7 | 249 | 3174400 | ||
140834254 | fatant | C | Dec. 27, 2021, 6:37 p.m. | OK | MS C++ 2017 | TESTS | 7 | 312 | 3174400 | ||
140822965 | 1_2_3_4_5_9 | C | Dec. 27, 2021, 4:45 p.m. | OK | PyPy 2 | TESTS | 7 | 155 | 19456000 | ||
140843221 | xyxoro | C | Dec. 27, 2021, 9:26 p.m. | OK | PyPy 3 | TESTS | 7 | 171 | 19558400 | ||
140821656 | legend.ary_as | C | Dec. 27, 2021, 4:37 p.m. | OK | PyPy 3 | TESTS | 7 | 217 | 19968000 | ||
140847537 | hxu10 | C | Dec. 28, 2021, 12:33 a.m. | OK | PyPy 3 | TESTS | 7 | 217 | 20275200 | ||
140857095 | Terryobeyes | C | Dec. 28, 2021, 4:57 a.m. | OK | PyPy 3 | TESTS | 7 | 234 | 21913600 | ||
140817831 | AbnerShen | C | Dec. 27, 2021, 4:30 p.m. | OK | PyPy 3 | TESTS | 7 | 248 | 22220800 | ||
140818490 | Bruhdhanmantri | C | Dec. 27, 2021, 4:31 p.m. | OK | PyPy 3 | TESTS | 7 | 265 | 22016000 | ||
140836248 | whatshisbucket | C | Dec. 27, 2021, 7:05 p.m. | OK | PyPy 3 | TESTS | 7 | 311 | 21708800 | ||
140838083 | NKUCristiano | C | Dec. 27, 2021, 7:33 p.m. | OK | PyPy 3 | TESTS | 7 | 326 | 21708800 | ||
140818195 | yonsweng | C | Dec. 27, 2021, 4:30 p.m. | OK | PyPy 3 | TESTS | 7 | 327 | 24166400 | ||
140817544 | MrKJ | C | Dec. 27, 2021, 4:29 p.m. | OK | PyPy 3 | TESTS | 7 | 389 | 22118400 | ||
140827891 | shockwave521 | C | Dec. 27, 2021, 5:22 p.m. | OK | PyPy 3-64 | TESTS | 7 | 109 | 26828800 | ||
140857482 | coolstreaming | C | Dec. 28, 2021, 5:04 a.m. | OK | PyPy 3-64 | TESTS | 7 | 124 | 19968000 | ||
140823279 | nitish420 | C | Dec. 27, 2021, 4:47 p.m. | OK | PyPy 3-64 | TESTS | 7 | 171 | 26931200 | ||
140850637 | rutz12 | C | Dec. 28, 2021, 2:32 a.m. | OK | PyPy 3-64 | TESTS | 7 | 233 | 27340800 | ||
140829270 | rainy | C | Dec. 27, 2021, 5:37 p.m. | OK | PyPy 3-64 | TESTS | 7 | 311 | 21299200 | ||
140841672 | KeiTsukishima | C | Dec. 27, 2021, 8:45 p.m. | OK | PyPy 3-64 | TESTS | 7 | 405 | 34201600 | ||
140856444 | happywater | C | Dec. 28, 2021, 4:45 a.m. | OK | PyPy 3-64 | TESTS | 7 | 451 | 28979200 | ||
140817541 | omshri2212 | C | Dec. 27, 2021, 4:29 p.m. | OK | PyPy 3-64 | TESTS | 7 | 483 | 21196800 | ||
140833970 | chetana14 | C | Dec. 27, 2021, 6:33 p.m. | OK | PyPy 3-64 | TESTS | 7 | 498 | 22425600 | ||
140819249 | MimSoft | C | Dec. 27, 2021, 4:32 p.m. | OK | PyPy 3-64 | TESTS | 7 | 514 | 20582400 | ||
140822613 | OLOGY | C | Dec. 27, 2021, 4:42 p.m. | OK | Python 2 | TESTS | 7 | 296 | 13107200 | ||
140826999 | OLOGY | C | Dec. 27, 2021, 5:14 p.m. | OK | Python 2 | TESTS | 7 | 311 | 13107200 | ||
140823119 | OLOGY | C | Dec. 27, 2021, 4:46 p.m. | OK | Python 2 | TESTS | 7 | 326 | 13107200 | ||
140830966 | NS3081992 | C | Dec. 27, 2021, 5:56 p.m. | OK | Python 3 | TESTS | 7 | 343 | 19660800 | ||
140835458 | sujoymondal | C | Dec. 27, 2021, 6:54 p.m. | OK | Python 3 | TESTS | 7 | 358 | 17817600 | ||
140828601 | mihir111p | C | Dec. 27, 2021, 5:30 p.m. | OK | Python 3 | TESTS | 7 | 374 | 18022400 | ||
140823293 | strange-creator | C | Dec. 27, 2021, 4:47 p.m. | OK | Python 3 | TESTS | 7 | 374 | 18022400 | ||
140829592 | MrRobott | C | Dec. 27, 2021, 5:40 p.m. | OK | Python 3 | TESTS | 7 | 389 | 17817600 | ||
140817416 | theanmolsharma | C | Dec. 27, 2021, 4:29 p.m. | OK | Python 3 | TESTS | 7 | 389 | 18022400 | ||
140830865 | NS3081992 | C | Dec. 27, 2021, 5:55 p.m. | OK | Python 3 | TESTS | 7 | 389 | 22016000 | ||
140841044 | adi_29 | C | Dec. 27, 2021, 8:31 p.m. | OK | Python 3 | TESTS | 7 | 390 | 18022400 | ||
140852443 | likith_02 | C | Dec. 28, 2021, 3:19 a.m. | OK | Python 3 | TESTS | 7 | 405 | 17408000 | ||
140817326 | lkm_codeforces | C | Dec. 27, 2021, 4:29 p.m. | OK | Python 3 | TESTS | 7 | 420 | 17408000 | ||
140830826 | apilat | C | Dec. 27, 2021, 5:54 p.m. | OK | Rust 2021 | TESTS | 7 | 30 | 3993600 | ||
140855438 | bqn | C | Dec. 28, 2021, 4:26 a.m. | OK | Rust 2021 | TESTS | 7 | 92 | 7884800 | ||
140833033 | Avanta | C | Dec. 27, 2021, 6:21 p.m. | OK | Rust 2021 | TESTS | 7 | 108 | 6348800 | ||
140825348 | Avanta | C | Dec. 27, 2021, 5:01 p.m. | OK | Rust 2021 | TESTS | 7 | 108 | 6348800 | ||
140824953 | Avanta | C | Dec. 27, 2021, 4:58 p.m. | OK | Rust 2021 | TESTS | 7 | 109 | 6348800 | ||
140833060 | Avanta | C | Dec. 27, 2021, 6:22 p.m. | OK | Rust 2021 | TESTS | 7 | 124 | 6348800 | ||
140830099 | takezawa | C | Dec. 27, 2021, 5:45 p.m. | OK | Rust 2021 | TESTS | 7 | 124 | 7372800 | ||
140828880 | takezawa | C | Dec. 27, 2021, 5:33 p.m. | OK | Rust 2021 | TESTS | 7 | 140 | 7372800 | ||
140827266 | clause | C | Dec. 27, 2021, 5:16 p.m. | OK | Rust 2021 | TESTS | 7 | 187 | 1638400 |
Back to search problems