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 |
---|---|---|---|---|---|---|
1966 | Codeforces Round 941 (Div. 2) | FINISHED | False | 7200 | 22951463 | April 27, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 18261 ) | A | Card Exchange | PROGRAMMING | constructive algorithms games greedy | 800 |
B'You have a hand of n cards, where each card has a number written on it, and a fixed integer k . You can perform the following operation any number of times: Here is one possible sequence of operations for the first example case, which has k=3 : What is the minimum number of cards you can have in your hand at the end of this process? The first line of the input contains a single integer t ( 1 <= t <= 500 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n and k ( 1 <= n <= 100 , 2 <= k <= 100 ) -- the number of cards you have, and the number of cards you exchange during each operation, respectively. The next line of each test case contains n integers c_1, c_2, ldots c_n ( 1 <= c_i <= 100 ) -- the numbers written on your cards. For each test case, output a single integer -- the minimum number of cards you can have left in your hand after any number of operations. The first example case corresponds to the picture above. The sequence of operations displayed there is optimal, so the answer is 2 . In the second example case, no operations can be performed, so the answer is 1 . In the fourth example case, you can repeatedly select 4 cards numbered with 1 and replace them with 3 cards numbered with 1 , until there are 3 cards left. '... |
Codeforces Round #941 (Div. 1, Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
259751588 | beyanon | A | May 6, 2024, 12:51 p.m. | OK | C# 10 | TESTS | 12 | 93 | 4198400 | 800 | |
261782573 | A1ternate | A | May 20, 2024, 1 p.m. | OK | C# 10 | TESTS | 12 | 109 | 3788800 | 800 | |
259727482 | Aatrowen | A | May 6, 2024, 9:27 a.m. | OK | C# 10 | TESTS | 12 | 124 | 3072000 | 800 | |
263347171 | justunderdog | A | May 30, 2024, 4:11 p.m. | OK | C# 10 | TESTS | 12 | 124 | 4403200 | 800 | |
259821474 | offbysome | A | May 7, 2024, 3:41 a.m. | OK | C# 10 | TESTS | 12 | 171 | 3686400 | 800 | |
262134282 | rubatotree | A | May 22, 2024, 11:16 a.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
262071650 | hokma | A | May 22, 2024, 1:21 a.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
261713599 | ProgCroco | A | May 20, 2024, 2:01 a.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
261473318 | zpc_ | A | May 18, 2024, 6:46 a.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
261471540 | penghaokun | A | May 18, 2024, 6:34 a.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
261470779 | yanjinee | A | May 18, 2024, 6:29 a.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
261102657 | mai_aaloo_hu | A | May 15, 2024, 8:29 p.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
260897795 | JiangSY | A | May 14, 2024, 8:32 a.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
260005632 | luogu_bot4 | A | May 8, 2024, 1:26 p.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
259437085 | HuZixuan | A | May 4, 2024, 2:33 a.m. | OK | C++14 (GCC 6-32) | TESTS | 12 | 46 | 0 | 800 | |
263647593 | randomguy999 | A | June 1, 2024, 3:13 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
262895963 | Dhoomketu16 | A | May 27, 2024, 2:37 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
262704073 | Youssef_l35l_Shaban | A | May 26, 2024, 12:35 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
262443793 | khald_bsywny | A | May 24, 2024, 11:36 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
262325639 | deadcool07 | A | May 24, 2024, 2:39 a.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
262292162 | Kritik12 | A | May 23, 2024, 5:12 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
262287224 | forcheating20041202 | A | May 23, 2024, 4:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
262227811 | Aa16 | A | May 23, 2024, 8:32 a.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
262212508 | miniMan | A | May 23, 2024, 3:27 a.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
262051322 | Jafartuk | A | May 21, 2024, 4:45 p.m. | OK | C++17 (GCC 7-32) | TESTS | 12 | 46 | 0 | 800 | |
263173401 | iseol | A | May 29, 2024, 5:48 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
262948535 | adu_alt | A | May 28, 2024, 2:50 a.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
262881381 | iangz | A | May 27, 2024, 12:43 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
262704051 | amar-Kumar | A | May 26, 2024, 12:35 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
262446843 | Yuvraj_003 | A | May 25, 2024, 1:32 a.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
262423438 | MagnusCarlsen321 | A | May 24, 2024, 6:04 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
262406073 | InnJY | A | May 24, 2024, 3:22 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
262365054 | riftk | A | May 24, 2024, 9:50 a.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
262317756 | rim_guenidez | A | May 23, 2024, 11:10 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
262314995 | A7md_Roshdy | A | May 23, 2024, 9:56 p.m. | OK | C++20 (GCC 13-64) | TESTS | 12 | 46 | 0 | 800 | |
263212561 | cpy | A | May 30, 2024, 8:31 a.m. | OK | D | TESTS | 12 | 124 | 0 | 800 | |
259001712 | bestelsuvn | A | May 1, 2024, 11:39 a.m. | OK | FPC | TESTS | 10 | 61 | 0 | 800 | |
259082666 | Alexanderter10 | A | May 2, 2024, 5:15 a.m. | OK | FPC | TESTS | 12 | 62 | 0 | 800 | |
263247859 | ANISHA7781 | A | May 30, 2024, 12:31 p.m. | OK | GNU C11 | TESTS | 12 | 46 | 0 | 800 | |
261704114 | daschristiefan008 | A | May 19, 2024, 9:27 p.m. | OK | GNU C11 | TESTS | 12 | 46 | 0 | 800 | |
259902688 | iamkoder | A | May 7, 2024, 4:21 p.m. | OK | GNU C11 | TESTS | 12 | 46 | 0 | 800 | |
260954215 | anirudh2005 | A | May 14, 2024, 4:18 p.m. | OK | GNU C11 | TESTS | 12 | 46 | 102400 | 800 | |
260590548 | Sanchit27 | A | May 11, 2024, 10:30 p.m. | OK | GNU C11 | TESTS | 12 | 46 | 102400 | 800 | |
259382341 | titan_t3 | A | May 3, 2024, 3:41 p.m. | OK | GNU C11 | TESTS | 12 | 46 | 102400 | 800 | |
263240075 | yyy.395 | A | May 30, 2024, 12:08 p.m. | OK | GNU C11 | TESTS | 12 | 61 | 0 | 800 | |
262697114 | disRue | A | May 26, 2024, 11:36 a.m. | OK | GNU C11 | TESTS | 12 | 61 | 0 | 800 | |
259381074 | titan_t3 | A | May 3, 2024, 3:31 p.m. | OK | GNU C11 | TESTS | 12 | 61 | 0 | 800 | |
260964376 | omnia_05 | A | May 14, 2024, 5:18 p.m. | OK | GNU C11 | TESTS | 12 | 61 | 102400 | 800 | |
258859263 | nguyenquocthao00 | A | April 30, 2024, 1:42 p.m. | OK | Go | TESTS | 10 | 46 | 3276800 | 800 | |
261074246 | PepRe | A | May 15, 2024, 3:21 p.m. | OK | Go | TESTS | 12 | 61 | 3584000 | 800 | |
261291436 | nguyenquocthao00 | A | May 17, 2024, 7:14 a.m. | OK | Go | TESTS | 12 | 61 | 4198400 | 800 | |
259291268 | nguyenquocthao00 | A | May 3, 2024, 3:11 a.m. | OK | Go | TESTS | 12 | 62 | 4300800 | 800 | |
259409330 | botayhard | A | May 3, 2024, 7:18 p.m. | OK | Go | TESTS | 12 | 62 | 10342400 | 800 | |
259610135 | ykt836 | A | May 5, 2024, 9:15 a.m. | OK | Go | TESTS | 12 | 77 | 4300800 | 800 | |
258685085 | Devil.Hunter | A | April 29, 2024, 12:26 p.m. | OK | Go | TESTS | 10 | 203 | 4403200 | 800 | |
259000914 | Naoki_M | A | May 1, 2024, 11:31 a.m. | OK | Haskell | TESTS | 10 | 77 | 4198400 | 800 | |
259000146 | Naoki_M | A | May 1, 2024, 11:23 a.m. | OK | Haskell | TESTS | 10 | 77 | 4198400 | 800 | |
258814960 | Nick | A | April 30, 2024, 5:17 a.m. | OK | Java 21 | TESTS | 10 | 233 | 614400 | 800 | |
259328616 | bhavaharan | A | May 3, 2024, 7:59 a.m. | OK | Java 21 | TESTS | 12 | 249 | 614400 | 800 | |
258805366 | bharath20 | A | April 30, 2024, 2:50 a.m. | OK | Java 21 | TESTS | 10 | 249 | 1024000 | 800 | |
260009057 | Yash9890 | A | May 8, 2024, 1:55 p.m. | OK | Java 21 | TESTS | 12 | 249 | 1331200 | 800 | |
258682838 | hit_refresh | A | April 29, 2024, 12:07 p.m. | OK | Java 21 | TESTS | 10 | 250 | 614400 | 800 | |
261071009 | Barbareek_3 | A | May 15, 2024, 2:50 p.m. | OK | Java 21 | TESTS | 12 | 265 | 409600 | 800 | |
262399414 | Kshitiz_san | A | May 24, 2024, 2:26 p.m. | OK | Java 21 | TESTS | 12 | 280 | 614400 | 800 | |
259616849 | Gaonon | A | May 5, 2024, 10:13 a.m. | OK | Java 21 | TESTS | 12 | 280 | 34508800 | 800 | |
260883055 | GoldenShadow | A | May 14, 2024, 6:05 a.m. | OK | Java 21 | TESTS | 12 | 281 | 512000 | 800 | |
259425810 | wizwilzo | A | May 3, 2024, 10 p.m. | OK | Java 21 | TESTS | 12 | 281 | 614400 | 800 | |
258854653 | RahulAhuja2901 | A | April 30, 2024, 12:56 p.m. | OK | Java 8 | TESTS | 10 | 139 | 0 | 800 | |
259785652 | Blue_BEE | A | May 6, 2024, 5:33 p.m. | OK | Java 8 | TESTS | 12 | 140 | 0 | 800 | |
262358591 | Sumitsingh7 | A | May 24, 2024, 8:57 a.m. | OK | Java 8 | TESTS | 12 | 155 | 6758400 | 800 | |
260159922 | iam_ljk | A | May 9, 2024, 5:37 p.m. | OK | Java 8 | TESTS | 12 | 156 | 0 | 800 | |
262680046 | tittiesboy99 | A | May 26, 2024, 9:16 a.m. | OK | Java 8 | TESTS | 12 | 171 | 0 | 800 | |
262279533 | Night1324 | A | May 23, 2024, 3:23 p.m. | OK | Java 8 | TESTS | 12 | 171 | 0 | 800 | |
259953931 | TempoparyRain | A | May 8, 2024, 5:50 a.m. | OK | Java 8 | TESTS | 12 | 171 | 0 | 800 | |
258984123 | arinarora.aa | A | May 1, 2024, 8:30 a.m. | OK | Java 8 | TESTS | 10 | 171 | 0 | 800 | |
258808884 | gdax | A | April 30, 2024, 3:51 a.m. | OK | Java 8 | TESTS | 10 | 171 | 0 | 800 | |
261001048 | Saurabh124 | A | May 15, 2024, 4:13 a.m. | OK | Java 8 | TESTS | 12 | 187 | 0 | 800 | |
259714110 | is-that-kt | A | May 6, 2024, 7:07 a.m. | OK | Kotlin 1.9 | TESTS | 12 | 187 | 102400 | 800 | |
259012539 | SlavaG | A | May 1, 2024, 1:29 p.m. | OK | Kotlin 1.9 | TESTS | 10 | 187 | 102400 | 800 | |
260559811 | titia | A | May 11, 2024, 4:18 p.m. | OK | Kotlin 1.9 | TESTS | 12 | 217 | 204800 | 800 | |
258996675 | dkozak94 | A | May 1, 2024, 10:44 a.m. | OK | Kotlin 1.9 | TESTS | 10 | 218 | 102400 | 800 | |
258805629 | gouravasdeo11 | A | April 30, 2024, 2:55 a.m. | OK | Kotlin 1.9 | TESTS | 10 | 233 | 0 | 800 | |
258996014 | dkozak94 | A | May 1, 2024, 10:36 a.m. | OK | Kotlin 1.9 | TESTS | 10 | 233 | 1843200 | 800 | |
259632086 | A_23 | A | May 5, 2024, 12:30 p.m. | OK | Kotlin 1.9 | TESTS | 12 | 280 | 1740800 | 800 | |
259406938 | TruongAnim | A | May 3, 2024, 7:01 p.m. | OK | Kotlin 1.9 | TESTS | 12 | 296 | 1536000 | 800 | |
258819016 | smallpipol805 | A | April 30, 2024, 6:15 a.m. | OK | Kotlin 1.9 | TESTS | 10 | 655 | 204800 | 800 | |
260815171 | dotdot1 | A | May 13, 2024, 2:42 p.m. | OK | Node.js | TESTS | 12 | 140 | 3174400 | 800 | |
258980335 | Kevin8502 | A | May 1, 2024, 7:50 a.m. | OK | PHP | TESTS | 10 | 77 | 307200 | 800 | |
260956113 | misorin | A | May 14, 2024, 4:33 p.m. | OK | PyPy 3 | TESTS | 12 | 124 | 2150400 | 800 | |
258974802 | Soshka | A | May 1, 2024, 6:58 a.m. | OK | PyPy 3 | TESTS | 10 | 156 | 3584000 | 800 | |
258849066 | anilsaxena | A | April 30, 2024, 12:08 p.m. | OK | PyPy 3 | TESTS | 10 | 156 | 3788800 | 800 | |
259032436 | kuanc | A | May 1, 2024, 4:14 p.m. | OK | PyPy 3 | TESTS | 10 | 171 | 3072000 | 800 | |
260904708 | 23f3004124 | A | May 14, 2024, 9:33 a.m. | OK | PyPy 3 | TESTS | 12 | 171 | 3379200 | 800 | |
262115543 | JR1der | A | May 22, 2024, 8:45 a.m. | OK | PyPy 3 | TESTS | 12 | 171 | 3584000 | 800 | |
259436285 | vjudge.7 | A | May 4, 2024, 2:17 a.m. | OK | PyPy 3 | TESTS | 12 | 171 | 4505600 | 800 | |
260906445 | 23f3004124 | A | May 14, 2024, 9:49 a.m. | OK | PyPy 3 | TESTS | 12 | 186 | 4198400 | 800 | |
259610098 | Kefrov | A | May 5, 2024, 9:15 a.m. | OK | PyPy 3 | TESTS | 12 | 186 | 5734400 | 800 | |
260905256 | 23f3004124 | A | May 14, 2024, 9:38 a.m. | OK | PyPy 3 | TESTS | 12 | 187 | 3379200 | 800 | |
259537580 | _happiness_ | A | May 4, 2024, 4:51 p.m. | OK | PyPy 3-64 | TESTS | 12 | 93 | 2867200 | 800 | |
259544552 | stalkmarket | A | May 4, 2024, 5:58 p.m. | OK | PyPy 3-64 | TESTS | 12 | 108 | 2252800 | 800 | |
259541747 | stalkmarket | A | May 4, 2024, 5:32 p.m. | OK | PyPy 3-64 | TESTS | 12 | 108 | 2252800 | 800 | |
258982701 | bergus | A | May 1, 2024, 8:15 a.m. | OK | PyPy 3-64 | TESTS | 10 | 108 | 2252800 | 800 | |
262109166 | TediousR | A | May 22, 2024, 7:55 a.m. | OK | PyPy 3-64 | TESTS | 12 | 108 | 3481600 | 800 | |
258672101 | Pimerroc | A | April 29, 2024, 11:10 a.m. | OK | PyPy 3-64 | TESTS | 10 | 109 | 1945600 | 800 | |
259095666 | Hastey | A | May 2, 2024, 7:42 a.m. | OK | PyPy 3-64 | TESTS | 12 | 109 | 2048000 | 800 | |
259563329 | dly123 | A | May 4, 2024, 9:45 p.m. | OK | PyPy 3-64 | TESTS | 12 | 109 | 2252800 | 800 | |
261280707 | swayam3108 | A | May 17, 2024, 5:23 a.m. | OK | PyPy 3-64 | TESTS | 12 | 109 | 2355200 | 800 | |
260204833 | captain_fatin | A | May 10, 2024, 5:11 a.m. | OK | PyPy 3-64 | TESTS | 12 | 109 | 2457600 | 800 | |
263629958 | barghav | A | June 1, 2024, 12:38 p.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
261091537 | codingkarlijiye | A | May 15, 2024, 6:09 p.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
260905286 | adityapatare161 | A | May 14, 2024, 9:38 a.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
260892054 | adityapatare161 | A | May 14, 2024, 7:37 a.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
260209234 | quickbot-17 | A | May 10, 2024, 6 a.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
259646249 | ngocle2001 | A | May 5, 2024, 2:37 p.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
259590967 | einspanner | A | May 5, 2024, 6:22 a.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
259436116 | vjudge.3 | A | May 4, 2024, 2:14 a.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
259435944 | bkifhr9 | A | May 4, 2024, 2:10 a.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
259427189 | PathToMaster | A | May 3, 2024, 10:31 p.m. | OK | Python 3 | TESTS | 12 | 77 | 0 | 800 | |
259580523 | 0x81 | A | May 5, 2024, 3:59 a.m. | OK | Ruby 3 | TESTS | 12 | 327 | 1740800 | 800 | |
261760346 | Chalaghoram | A | May 20, 2024, 9:59 a.m. | OK | Rust 2021 | TESTS | 12 | 46 | 0 | 800 | |
259721573 | cck111 | A | May 6, 2024, 8:31 a.m. | OK | Rust 2021 | TESTS | 12 | 46 | 0 | 800 | |
260784436 | vjudge.1 | A | May 13, 2024, 11:03 a.m. | OK | Rust 2021 | TESTS | 12 | 62 | 0 | 800 | |
259738961 | urffsamhunt | A | May 6, 2024, 11:13 a.m. | OK | Rust 2021 | TESTS | 12 | 77 | 0 | 800 | |
259423791 | mroik | A | May 3, 2024, 9:21 p.m. | OK | Rust 2021 | TESTS | 12 | 77 | 0 | 800 |
Back to search problems