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 |
---|---|---|---|---|---|---|
1992 | Codeforces Round 957 (Div. 3) | FINISHED | False | 8100 | 11114699 | July 11, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 34268 ) | B | Angry Monk | PROGRAMMING | greedy math sortings |
B"To celebrate his recovery, k1o0n has baked an enormous n metres long potato casserole. Turns out, Noobish_Monk just can't stand potatoes, so he decided to ruin k1o0n's meal. He has cut it into k pieces, of lengths a_1, a_2, ... , a_k meters. k1o0n wasn't keen on that. Luckily, everything can be fixed. In order to do that, k1o0n can do one of the following operations: Help k1o0n to find the minimum number of operations he needs to do in order to merge the casserole into one piece with length n . For example, if n=5 , k=2 and a = [3, 2] , it is optimal to do the following: Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^4 ). Description of each test case consists of two lines. The first line contains two integers n and k ( 2 <= n <= 10^9 , 2 <= k <= 10^5 ) -- length of casserole and the number of pieces. The second line contains k integers a_1, a_2, ldots, a_k ( 1 <= a_i <= n - 1 , sum a_i = n ) -- lengths of pieces of casserole, which Noobish_Monk has cut. It is guaranteed that the sum of k over all t test cases doesn't exceed 2 cdot 10^5 . For each test case, output the minimum number of operations K1o0n needs to restore his pie after the terror of Noobish_Monk. "... |
Shayan's Video Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
270076340 | 71IQ | B | July 11, 2024, 7:19 p.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 62 | 0 | ||
270078771 | slime100 | B | July 11, 2024, 7:44 p.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 62 | 0 | ||
270075779 | O_oAHHA | B | July 11, 2024, 7:14 p.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 62 | 102400 | ||
270073464 | daohuyenchi21 | B | July 11, 2024, 6:53 p.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 62 | 819200 | ||
270108419 | akhilmishra9325 | B | July 12, 2024, 3:19 a.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 77 | 0 | ||
270103420 | rank22 | B | July 12, 2024, 2:25 a.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 77 | 0 | ||
270080865 | Munwind | B | July 11, 2024, 8:08 p.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 77 | 0 | ||
270119502 | anuppal602 | B | July 12, 2024, 5:23 a.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 77 | 0 | ||
270118021 | atriyatuoli | B | July 12, 2024, 5:08 a.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 77 | 0 | ||
270109340 | H_M_K | B | July 12, 2024, 3:29 a.m. | OK | C++14 (GCC 6-32) | TESTS | 4 | 77 | 0 | ||
270053456 | 7kappend19 | B | July 11, 2024, 5:29 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 46 | 0 | ||
270077929 | Hossam.Saber | B | July 11, 2024, 7:36 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 61 | 0 | ||
270114916 | code_kaustubh | B | July 12, 2024, 4:34 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 61 | 0 | ||
270113364 | yellurividdu | B | July 12, 2024, 4:14 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 61 | 0 | ||
270107484 | nitishkumarnh451 | B | July 12, 2024, 3:10 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 61 | 0 | ||
270097489 | emulative | B | July 12, 2024, 1:02 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 61 | 0 | ||
270094051 | _wh_aaa_ | B | July 12, 2024, 12:02 a.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 61 | 0 | ||
270093249 | neOn_ | B | July 11, 2024, 11:45 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 61 | 0 | ||
270089897 | rakhejaforu.ar | B | July 11, 2024, 10:29 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 61 | 0 | ||
270077999 | 71IQ | B | July 11, 2024, 7:36 p.m. | OK | C++17 (GCC 7-32) | TESTS | 4 | 61 | 0 | ||
270095841 | tmly010407 | B | July 12, 2024, 12:36 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 31 | 1331200 | ||
270123043 | Ne0B1ade | B | July 12, 2024, 5:55 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 0 | ||
270099097 | maspy | B | July 12, 2024, 1:26 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 46 | 307200 | ||
270122752 | NguyenPhuocHuuDung | B | July 12, 2024, 5:53 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 61 | 0 | ||
270119023 | semi-h | B | July 12, 2024, 5:18 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 61 | 0 | ||
270118779 | Tri-sex | B | July 12, 2024, 5:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 61 | 0 | ||
270106679 | msp_008987 | B | July 12, 2024, 3:02 a.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 61 | 0 | ||
270092406 | thisislike_fan | B | July 11, 2024, 11:25 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 61 | 0 | ||
270084384 | szaranczuk | B | July 11, 2024, 8:54 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 61 | 0 | ||
270087082 | 36champ | B | July 11, 2024, 9:34 p.m. | OK | C++20 (GCC 13-64) | TESTS | 4 | 61 | 0 | ||
270090310 | bluemegane | B | July 11, 2024, 10:36 p.m. | OK | C# 8 | TESTS | 4 | 140 | 11161600 | ||
270067813 | yashdbzfan | B | July 11, 2024, 6:06 p.m. | OK | GNU C11 | TESTS | 4 | 77 | 409600 | ||
270100795 | fa2_l | B | July 12, 2024, 1:50 a.m. | OK | GNU C11 | TESTS | 4 | 92 | 512000 | ||
270050500 | petchimani11 | B | July 11, 2024, 5:13 p.m. | OK | GNU C11 | TESTS | 4 | 93 | 512000 | ||
270105869 | uomo | B | July 12, 2024, 2:54 a.m. | OK | GNU C11 | TESTS | 4 | 109 | 921600 | ||
270052170 | ozz | B | July 11, 2024, 5:22 p.m. | OK | Go | TESTS | 4 | 124 | 2560000 | ||
270083816 | arwa_khattab | B | July 11, 2024, 8:45 p.m. | OK | Java 21 | TESTS | 4 | 233 | 102400 | ||
270079691 | kunalraj8051 | B | July 11, 2024, 7:55 p.m. | OK | Java 21 | TESTS | 4 | 264 | 512000 | ||
270087154 | cosenza | B | July 11, 2024, 9:36 p.m. | OK | Java 21 | TESTS | 4 | 265 | 204800 | ||
270080638 | M_Hassanin488 | B | July 11, 2024, 8:05 p.m. | OK | Java 21 | TESTS | 4 | 265 | 409600 | ||
270070403 | LakhimpurKheri | B | July 11, 2024, 6:27 p.m. | OK | Java 21 | TESTS | 4 | 265 | 512000 | ||
270118406 | InfinityX | B | July 12, 2024, 5:12 a.m. | OK | Java 21 | TESTS | 4 | 265 | 614400 | ||
270074567 | ankush9140 | B | July 11, 2024, 7:03 p.m. | OK | Java 21 | TESTS | 4 | 265 | 1024000 | ||
270088302 | krish0596 | B | July 11, 2024, 9:56 p.m. | OK | Java 21 | TESTS | 4 | 280 | 614400 | ||
270089432 | lyongwolf | B | July 11, 2024, 10:19 p.m. | OK | Java 21 | TESTS | 4 | 296 | 307200 | ||
270090196 | popt | B | July 11, 2024, 10:35 p.m. | OK | Java 21 | TESTS | 4 | 452 | 921600 | ||
270083841 | Blue_BEE | B | July 11, 2024, 8:46 p.m. | OK | Java 8 | TESTS | 4 | 155 | 0 | ||
270080094 | Sumitsingh7 | B | July 11, 2024, 7:59 p.m. | OK | Java 8 | TESTS | 4 | 155 | 6656000 | ||
270117935 | coderman2004 | B | July 12, 2024, 5:07 a.m. | OK | Java 8 | TESTS | 4 | 171 | 0 | ||
270052399 | Safawt | B | July 11, 2024, 5:23 p.m. | OK | Java 8 | TESTS | 4 | 171 | 0 | ||
270122292 | om172 | B | July 12, 2024, 5:49 a.m. | OK | Java 8 | TESTS | 4 | 187 | 0 | ||
270108648 | Hinnawi24 | B | July 12, 2024, 3:22 a.m. | OK | Java 8 | TESTS | 4 | 202 | 0 | ||
270117591 | Kempachi | B | July 12, 2024, 5:04 a.m. | OK | Java 8 | TESTS | 4 | 218 | 0 | ||
270068104 | maheshwarang001 | B | July 11, 2024, 6:09 p.m. | OK | Java 8 | TESTS | 4 | 218 | 0 | ||
270087829 | 019mj | B | July 11, 2024, 9:47 p.m. | OK | Java 8 | TESTS | 4 | 233 | 39116800 | ||
270080757 | Yossefayman | B | July 11, 2024, 8:07 p.m. | OK | Java 8 | TESTS | 4 | 327 | 0 | ||
270109334 | 51Hz | B | July 12, 2024, 3:29 a.m. | OK | Kotlin 1.9 | TESTS | 4 | 296 | 5324800 | ||
270116267 | parth_7042 | B | July 12, 2024, 4:49 a.m. | OK | PHP | TESTS | 4 | 78 | 22937600 | ||
270089851 | random__person | B | July 11, 2024, 10:28 p.m. | OK | PyPy 3 | TESTS | 4 | 186 | 11366400 | ||
270088048 | papdichaat | B | July 11, 2024, 9:52 p.m. | OK | PyPy 3 | TESTS | 4 | 249 | 10547200 | ||
270053889 | Fathy_77 | B | July 11, 2024, 5:32 p.m. | OK | PyPy 3 | TESTS | 4 | 249 | 12902400 | ||
270100859 | ZzaZi | B | July 12, 2024, 1:51 a.m. | OK | PyPy 3 | TESTS | 4 | 249 | 13209600 | ||
270096623 | WairForIt | B | July 12, 2024, 12:50 a.m. | OK | PyPy 3 | TESTS | 4 | 250 | 11980800 | ||
270112100 | Ishaan_06 | B | July 12, 2024, 3:58 a.m. | OK | PyPy 3 | TESTS | 4 | 264 | 11366400 | ||
270110436 | vovesi4341 | B | July 12, 2024, 3:40 a.m. | OK | PyPy 3 | TESTS | 4 | 327 | 11366400 | ||
270081206 | 1234567890123 | B | July 11, 2024, 8:12 p.m. | OK | PyPy 3 | TESTS | 4 | 468 | 15155200 | ||
270076611 | DeathbringerY | B | July 11, 2024, 7:22 p.m. | OK | PyPy 3-64 | TESTS | 4 | 108 | 17510400 | ||
270069878 | gardengnome | B | July 11, 2024, 6:23 p.m. | OK | PyPy 3-64 | TESTS | 4 | 109 | 15974400 | ||
270068884 | Fire_Force | B | July 11, 2024, 6:14 p.m. | OK | PyPy 3-64 | TESTS | 4 | 109 | 16896000 | ||
270120074 | lrx___ | B | July 12, 2024, 5:28 a.m. | OK | PyPy 3-64 | TESTS | 4 | 109 | 17715200 | ||
270051328 | lrx____ | B | July 11, 2024, 5:17 p.m. | OK | PyPy 3-64 | TESTS | 4 | 109 | 17715200 | ||
270086531 | chyragym | B | July 11, 2024, 9:25 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 16896000 | ||
270068925 | Zmarlen | B | July 11, 2024, 6:15 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 17408000 | ||
270069032 | NitroSpear | B | July 11, 2024, 6:16 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 17715200 | ||
270053688 | magde.spb | B | July 11, 2024, 5:31 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 18022400 | ||
270087159 | USYDLDH | B | July 11, 2024, 9:36 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 19558400 | ||
270104499 | sy_NBA | B | July 12, 2024, 2:38 a.m. | OK | Python 3 | TESTS | 4 | 109 | 16896000 | ||
270075007 | Venky9211 | B | July 11, 2024, 7:07 p.m. | OK | Python 3 | TESTS | 4 | 124 | 16179200 | ||
270054767 | TSGAshok | B | July 11, 2024, 5:38 p.m. | OK | Python 3 | TESTS | 4 | 124 | 16179200 | ||
270094721 | lwp666 | B | July 12, 2024, 12:15 a.m. | OK | Python 3 | TESTS | 4 | 124 | 17612800 | ||
270112435 | sarang.n.m | B | July 12, 2024, 4:02 a.m. | OK | Python 3 | TESTS | 4 | 140 | 16179200 | ||
270077822 | ShufflesCards | B | July 11, 2024, 7:34 p.m. | OK | Python 3 | TESTS | 4 | 140 | 16179200 | ||
270098172 | pranay_k | B | July 12, 2024, 1:14 a.m. | OK | Python 3 | TESTS | 4 | 140 | 17305600 | ||
270089033 | HaloBoy | B | July 11, 2024, 10:11 p.m. | OK | Python 3 | TESTS | 4 | 140 | 17305600 | ||
270078593 | anishakmaiya | B | July 11, 2024, 7:43 p.m. | OK | Python 3 | TESTS | 4 | 140 | 20684800 | ||
270079390 | juanbueno00k | B | July 11, 2024, 7:51 p.m. | OK | Python 3 | TESTS | 4 | 155 | 13619200 | ||
270074866 | 0x81 | B | July 11, 2024, 7:06 p.m. | OK | Ruby 3 | TESTS | 4 | 359 | 21094400 | ||
270067347 | victorborzov | B | July 11, 2024, 6:03 p.m. | OK | Rust 2021 | TESTS | 4 | 46 | 0 |
Back to search problems