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 |
---|---|---|---|---|---|---|
1988 | Codeforces Round 958 (Div. 2) | FINISHED | False | 7200 | 16125863 | July 15, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 24001 ) | A | Split the Multiset | PROGRAMMING | brute force dp greedy math |
B'A multiset is a set of numbers in which there can be equal elements, and the order of the numbers does not matter. For example, {2,2,4 } is a multiset. You have a multiset S . Initially, the multiset contains only one positive integer n . That is, S= {n } . Additionally, there is a given positive integer k . In one operation, you can select any positive integer u in S and remove one copy of u from S . Then, insert no more than k positive integers into S so that the sum of all inserted integers is equal to u . Find the minimum number of operations to make S contain n ones. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 1000 ). Description of the test cases follows. The only line of each testcase contains two integers n,k ( 1 <= n <= 1000,2 <= k <= 1000 ). For each testcase, print one integer, which is the required answer. For the first test case, initially S= {1 } , already satisfying the requirement. Therefore, we need zero operations. For the second test case, initially S= {5 } . We can apply the following operations: Using 4 operations in total, we achieve the goal. For the third test case, initially S= {6 } . We can apply the following operations: Using 3 operations in total, we achieve the goal. For the fourth test case, initially S= {16 } . We can apply the following operations: Using 5 operations in total, we achieve the goal. '... |
Editorial of Codeforces Round 958 (Div. 2) |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
270766095 | sohrab | A | July 15, 2024, 7:58 p.m. | OK | C# 10 | TESTS | 3 | 93 | 0 | ||
270801292 | CapClark | A | July 16, 2024, 3:29 a.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 30 | 0 | ||
270799463 | ayushk1234 | A | July 16, 2024, 3:11 a.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 30 | 0 | ||
270797423 | JEdward | A | July 16, 2024, 2:52 a.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 30 | 0 | ||
270793841 | zzfzzfzzfs | A | July 16, 2024, 2:15 a.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 30 | 0 | ||
270793336 | PFChong | A | July 16, 2024, 2:10 a.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 30 | 0 | ||
270764627 | rolex009 | A | July 15, 2024, 7:43 p.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 30 | 0 | ||
270748475 | 2022mcb1269 | A | July 15, 2024, 5:40 p.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 30 | 0 | ||
270751518 | Prianshu18 | A | July 15, 2024, 5:58 p.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 30 | 0 | ||
270803039 | sshabnamzsf | A | July 16, 2024, 3:46 a.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 31 | 0 | ||
270806208 | Lord_Voldemort_ | A | July 16, 2024, 4:21 a.m. | OK | C++14 (GCC 6-32) | TESTS | 3 | 31 | 0 | ||
270798249 | dylsd12345 | A | July 16, 2024, 3 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 15 | 0 | ||
270807845 | chandupaambepitiya | A | July 16, 2024, 4:40 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
270815813 | 19Doors | A | July 16, 2024, 5:59 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
270815269 | ateev_mishra7 | A | July 16, 2024, 5:54 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
270813934 | Manoj_Dhundhalva | A | July 16, 2024, 5:42 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
270813868 | amitrathore | A | July 16, 2024, 5:42 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
270813419 | Vedant_22 | A | July 16, 2024, 5:37 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
270810880 | Amaanhussain11 | A | July 16, 2024, 5:13 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
270810545 | gaganbacademics6 | A | July 16, 2024, 5:10 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
270807377 | yabhist | A | July 16, 2024, 4:35 a.m. | OK | C++17 (GCC 7-32) | TESTS | 3 | 30 | 0 | ||
270751952 | yyyz04 | A | July 15, 2024, 6 p.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 15 | 0 | ||
270792576 | Mrlaolu | A | July 16, 2024, 2:02 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 15 | 0 | ||
270789846 | yuxiaoyi | A | July 16, 2024, 1:32 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 15 | 0 | ||
270807352 | Saiful241 | A | July 16, 2024, 4:34 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
270814992 | CanDuanQi | A | July 16, 2024, 5:51 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
270813883 | singhmohit9868 | A | July 16, 2024, 5:42 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
270812056 | Hamza_28 | A | July 16, 2024, 5:24 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
270811362 | b_AHA_r | A | July 16, 2024, 5:17 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
270808278 | md_nihal | A | July 16, 2024, 4:45 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
270807921 | quocanh19082010 | A | July 16, 2024, 4:41 a.m. | OK | C++20 (GCC 13-64) | TESTS | 3 | 30 | 0 | ||
270775761 | bluemegane | A | July 15, 2024, 9:54 p.m. | OK | C# 8 | TESTS | 3 | 93 | 0 | ||
270760857 | atharvatol04 | A | July 15, 2024, 7:07 p.m. | OK | GNU C11 | TESTS | 3 | 31 | 0 | ||
270754142 | Toneshwar | A | July 15, 2024, 6:15 p.m. | OK | GNU C11 | TESTS | 3 | 31 | 0 | ||
270803442 | QuangBuiCPP | A | July 16, 2024, 3:50 a.m. | OK | GNU C11 | TESTS | 3 | 46 | 0 | ||
270748262 | Motaher_emon | A | July 15, 2024, 5:39 p.m. | OK | GNU C11 | TESTS | 3 | 46 | 0 | ||
270781416 | quasikote | A | July 15, 2024, 11:39 p.m. | OK | GNU C11 | TESTS | 3 | 46 | 102400 | ||
270756104 | Toneshwar | A | July 15, 2024, 6:29 p.m. | OK | GNU C11 | TESTS | 3 | 46 | 102400 | ||
270791993 | nguyenquocthao00 | A | July 16, 2024, 1:56 a.m. | OK | Go | TESTS | 3 | 46 | 102400 | ||
270800429 | botayhard | A | July 16, 2024, 3:20 a.m. | OK | Go | TESTS | 3 | 61 | 4403200 | ||
270765857 | sonmars | A | July 15, 2024, 7:56 p.m. | OK | Go | TESTS | 3 | 62 | 102400 | ||
270803752 | minitly | A | July 16, 2024, 3:53 a.m. | OK | Java 21 | TESTS | 3 | 186 | 0 | ||
270803176 | adi3008 | A | July 16, 2024, 3:48 a.m. | OK | Java 21 | TESTS | 3 | 187 | 0 | ||
270802909 | adi3008 | A | July 16, 2024, 3:45 a.m. | OK | Java 21 | TESTS | 3 | 187 | 204800 | ||
270774974 | Sylvester_ | A | July 15, 2024, 9:42 p.m. | OK | Java 21 | TESTS | 3 | 202 | 204800 | ||
270800450 | yang_wei | A | July 16, 2024, 3:21 a.m. | OK | Java 21 | TESTS | 3 | 202 | 409600 | ||
270802779 | adi3008 | A | July 16, 2024, 3:43 a.m. | OK | Java 21 | TESTS | 3 | 202 | 512000 | ||
270801649 | susvant | A | July 16, 2024, 3:33 a.m. | OK | Java 21 | TESTS | 3 | 202 | 614400 | ||
270765365 | ankitv9936 | A | July 15, 2024, 7:51 p.m. | OK | Java 21 | TESTS | 3 | 202 | 614400 | ||
270804838 | anshpatel2434 | A | July 16, 2024, 4:05 a.m. | OK | Java 21 | TESTS | 3 | 218 | 0 | ||
270768027 | Yuvraj_Kathad | A | July 15, 2024, 8:17 p.m. | OK | Java 21 | TESTS | 3 | 218 | 409600 | ||
270808287 | Devstudent01 | A | July 16, 2024, 4:45 a.m. | OK | Java 8 | TESTS | 3 | 124 | 0 | ||
270785653 | rjrajeevofficial | A | July 16, 2024, 12:46 a.m. | OK | Java 8 | TESTS | 3 | 124 | 0 | ||
270757970 | Hinnawi24 | A | July 15, 2024, 6:42 p.m. | OK | Java 8 | TESTS | 3 | 124 | 0 | ||
270802455 | om172 | A | July 16, 2024, 3:40 a.m. | OK | Java 8 | TESTS | 3 | 155 | 0 | ||
270756909 | aishwarykesarwani | A | July 15, 2024, 6:35 p.m. | OK | Java 8 | TESTS | 3 | 155 | 0 | ||
270763196 | anantagarwal | A | July 15, 2024, 7:29 p.m. | OK | Java 8 | TESTS | 3 | 156 | 0 | ||
270755414 | Yossefayman | A | July 15, 2024, 6:24 p.m. | OK | Java 8 | TESTS | 3 | 156 | 0 | ||
270805398 | Mahf | A | July 16, 2024, 4:12 a.m. | OK | Java 8 | TESTS | 3 | 171 | 0 | ||
270758347 | bondchi | A | July 15, 2024, 6:45 p.m. | OK | Java 8 | TESTS | 3 | 171 | 0 | ||
270756038 | vedjaiswal | A | July 15, 2024, 6:29 p.m. | OK | Java 8 | TESTS | 3 | 171 | 0 | ||
270811876 | PathakAbhi14 | A | July 16, 2024, 5:22 a.m. | OK | Kotlin 1.9 | TESTS | 3 | 156 | 0 | ||
270760683 | Alex_Toppo_06 | A | July 15, 2024, 7:06 p.m. | OK | Kotlin 1.9 | TESTS | 3 | 187 | 0 | ||
270802140 | mythicalrocket | A | July 16, 2024, 3:37 a.m. | OK | PyPy 3 | TESTS | 3 | 77 | 2150400 | ||
270757548 | x3mka | A | July 15, 2024, 6:39 p.m. | OK | PyPy 3 | TESTS | 3 | 93 | 2355200 | ||
270809563 | vaibhav245 | A | July 16, 2024, 4:59 a.m. | OK | PyPy 3 | TESTS | 3 | 108 | 2764800 | ||
270756740 | kanish217 | A | July 15, 2024, 6:33 p.m. | OK | PyPy 3 | TESTS | 3 | 124 | 2662400 | ||
270792304 | TheBestFromEast | A | July 16, 2024, 1:59 a.m. | OK | PyPy 3 | TESTS | 3 | 124 | 2764800 | ||
270782224 | TheBestFromEast | A | July 15, 2024, 11:54 p.m. | OK | PyPy 3 | TESTS | 3 | 124 | 2969600 | ||
270814981 | rshohruh | A | July 16, 2024, 5:51 a.m. | OK | PyPy 3 | TESTS | 3 | 125 | 2764800 | ||
270759048 | WalrusRamen21 | A | July 15, 2024, 6:51 p.m. | OK | PyPy 3 | TESTS | 3 | 139 | 2764800 | ||
270750218 | papdichaat | A | July 15, 2024, 5:50 p.m. | OK | PyPy 3 | TESTS | 3 | 140 | 2764800 | ||
270783715 | TheBestFromEast | A | July 16, 2024, 12:18 a.m. | OK | PyPy 3 | TESTS | 3 | 155 | 2252800 | ||
270785675 | hello_world0421 | A | July 16, 2024, 12:46 a.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 0 | ||
270764924 | NitroSpear | A | July 15, 2024, 7:46 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1331200 | ||
270765475 | MistaFlash | A | July 15, 2024, 7:52 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1433600 | ||
270760275 | RobinFromTheHood | A | July 15, 2024, 7:02 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1433600 | ||
270744204 | bokuto_alright | A | July 15, 2024, 5:21 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1433600 | ||
270768921 | MdAbedin | A | July 15, 2024, 8:27 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 1536000 | ||
270745117 | DarkTemplarDrop | A | July 15, 2024, 5:24 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 2048000 | ||
270746696 | BeastRD | A | July 15, 2024, 5:31 p.m. | OK | PyPy 3-64 | TESTS | 3 | 77 | 2560000 | ||
270761905 | sardar.khan | A | July 15, 2024, 7:17 p.m. | OK | PyPy 3-64 | TESTS | 3 | 78 | 1433600 | ||
270809709 | master_JD | A | July 16, 2024, 5 a.m. | OK | PyPy 3-64 | TESTS | 3 | 78 | 1945600 | ||
270812406 | IDONI | A | July 16, 2024, 5:29 a.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270807387 | YhuanDebeste | A | July 16, 2024, 4:35 a.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270803304 | bnuwjy | A | July 16, 2024, 3:49 a.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270798646 | OLOGY | A | July 16, 2024, 3:04 a.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270794442 | ao_lang | A | July 16, 2024, 2:21 a.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270790763 | World_last | A | July 16, 2024, 1:42 a.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270790457 | World_last | A | July 16, 2024, 1:39 a.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270788177 | Inevitable_way | A | July 16, 2024, 1:18 a.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270762107 | Ali88 | A | July 15, 2024, 7:20 p.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270744644 | AhmedIbrahim24010 | A | July 15, 2024, 5:22 p.m. | OK | Python 3 | TESTS | 3 | 61 | 0 | ||
270807536 | YhuanDebeste | A | July 16, 2024, 4:36 a.m. | OK | Ruby 3 | TESTS | 3 | 265 | 204800 | ||
270759858 | VVellVVellVVell | A | July 15, 2024, 6:58 p.m. | OK | Ruby 3 | TESTS | 3 | 265 | 204800 | ||
270801639 | YhuanDebeste | A | July 16, 2024, 3:33 a.m. | OK | Ruby 3 | TESTS | 3 | 280 | 409600 | ||
270801558 | YhuanDebeste | A | July 16, 2024, 3:32 a.m. | OK | Ruby 3 | TESTS | 3 | 296 | 307200 | ||
270760175 | VVellVVellVVell | A | July 15, 2024, 7:01 p.m. | OK | Ruby 3 | TESTS | 3 | 296 | 512000 | ||
270805248 | scanhex | A | July 16, 2024, 4:10 a.m. | OK | Rust 2021 | TESTS | 3 | 46 | 0 |
Back to search problems