Codeforces Round 630 (Div. 2)

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
1332 Codeforces Round 630 (Div. 2) FINISHED False 9000 151691111 March 31, 2020, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 17131 ) C K-Complete Word PROGRAMMING dfs and similar ds greedy implementation strings 1500

B'Word s of length n is called k -complete if For example, "abaaba" is a 3 -complete word, while "abccba" is not. Bob is given a word s of length n consisting of only lowercase Latin letters and an integer k , such that n is divisible by k . He wants to convert s to any k -complete word. To do this Bob can choose some i ( 1 <= i <= n ) and replace the letter at position i with some other lowercase Latin letter. So now Bob wants to know the minimum number of letters he has to replace to convert s to any k -complete word. Note that Bob can do zero changes if the word s is already k -complete. You are required to answer t test cases independently. The first line contains a single integer t ( 1 <= t <= 10^5 ) -- the number of test cases. The first line of each test case contains two integers n and k ( 1 <= k < n <= 2 cdot 10^5 , n is divisible by k ). The second line of each test case contains a word s of length n . It is guaranteed that word s only contains lowercase Latin letters. And it is guaranteed that the sum of n over all test cases will not exceed 2 cdot 10^5 . For each test case, output one integer, representing the minimum number of characters he has to replace to convert s to any k -complete word. In the first test case, one optimal solution is aaaaaa. In the second test case, the given word itself is k -complete. '...

Tutorials

Codeforces Round #630 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
75432819 pastafaryan C April 3, 2020, 7:56 p.m. OK Clang++17 Diagnostics TESTS 18 264 15052800 1500
75432693 pastafaryan C April 3, 2020, 7:54 p.m. OK Clang++17 Diagnostics TESTS 18 296 15052800 1500
75135688 denchik007orel57 C April 1, 2020, 3:28 p.m. OK FPC TESTS 18 373 23244800 1500
74980458 LaSWeeG C March 31, 2020, 3:23 p.m. OK FPC TESTS 18 389 23040000 1500
75349420 hnust_tanzhongsheng C April 3, 2020, 1:50 p.m. OK GNU C11 TESTS 18 31 2662400 1500
75192610 JoseTomas01 C April 2, 2020, 1:52 a.m. OK GNU C11 TESTS 18 327 204800 1500
75965782 dreamdream C April 9, 2020, 7:58 a.m. OK GNU C11 TESTS 18 327 204800 1500
74980189 755352046 C March 31, 2020, 3:22 p.m. OK GNU C11 TESTS 18 327 204800 1500
74982704 YOK C March 31, 2020, 3:28 p.m. OK GNU C11 TESTS 18 327 204800 1500
74988332 weastur C March 31, 2020, 3:45 p.m. OK GNU C11 TESTS 18 327 204800 1500
75482374 MikuSakula C April 4, 2020, 11:54 a.m. OK GNU C11 TESTS 18 327 10649600 1500
75067239 Anil888 C April 1, 2020, 10:24 a.m. OK GNU C11 TESTS 18 358 204800 1500
74989550 hnust_zengwei1 C March 31, 2020, 3:49 p.m. OK GNU C11 TESTS 18 358 204800 1500
74990796 rainboy C March 31, 2020, 3:53 p.m. OK GNU C11 TESTS 18 358 204800 1500
75217063 _zay C April 2, 2020, 8:31 a.m. OK GNU C++11 TESTS 18 15 2150400 1500
75027836 NaGuT C April 1, 2020, 12:05 a.m. OK GNU C++11 TESTS 18 31 102400 1500
75059374 lgwza C April 1, 2020, 9 a.m. OK GNU C++11 TESTS 18 31 204800 1500
75820908 luogu_bot5 C April 8, 2020, 9:54 a.m. OK GNU C++11 TESTS 18 31 204800 1500
75039607 vjudge4 C April 1, 2020, 4:57 a.m. OK GNU C++11 TESTS 18 31 307200 1500
74980221 _Backl1ght C March 31, 2020, 3:22 p.m. OK GNU C++11 TESTS 18 31 307200 1500
75551134 luogu_bot5 C April 5, 2020, 9:04 a.m. OK GNU C++11 TESTS 18 31 409600 1500
74979432 chen_03 C March 31, 2020, 3:20 p.m. OK GNU C++11 TESTS 18 31 819200 1500
75027677 SuperDY C April 1, 2020, midnight OK GNU C++11 TESTS 18 31 1228800 1500
75301817 AutumnKite C April 3, 2020, 2:40 a.m. OK GNU C++11 TESTS 18 31 17408000 1500
75949734 guaninld C April 9, 2020, 4:34 a.m. OK GNU C++14 TESTS 18 46 204800 1500
75949704 vjudge4 C April 9, 2020, 4:33 a.m. OK GNU C++14 TESTS 18 46 204800 1500
75814113 Paranoid-LS C April 8, 2020, 8:03 a.m. OK GNU C++14 TESTS 18 46 204800 1500
75300734 mathking1021 C April 3, 2020, 2:04 a.m. OK GNU C++14 TESTS 18 46 204800 1500
75241109 JOYTUN_17 C April 2, 2020, 12:59 p.m. OK GNU C++14 TESTS 18 46 204800 1500
75231557 Merci_12_Y C April 2, 2020, 11:26 a.m. OK GNU C++14 TESTS 18 46 204800 1500
75226176 George1123 C April 2, 2020, 10:25 a.m. OK GNU C++14 TESTS 18 46 204800 1500
75154503 zw_fan C April 1, 2020, 4:17 p.m. OK GNU C++14 TESTS 18 46 204800 1500
75030741 house-cat C April 1, 2020, 1:33 a.m. OK GNU C++14 TESTS 18 46 204800 1500
75003789 tomaso C March 31, 2020, 5:42 p.m. OK GNU C++14 TESTS 18 46 204800 1500
74990016 _andyli C March 31, 2020, 3:50 p.m. OK GNU C++17 TESTS 18 31 2355200 1500
75234993 _andyli C April 2, 2020, 12:03 p.m. OK GNU C++17 TESTS 18 31 2355200 1500
75533619 vjudge3 C April 5, 2020, 4:40 a.m. OK GNU C++17 TESTS 18 46 204800 1500
75871304 vjudge3 C April 8, 2020, 3:12 p.m. OK GNU C++17 TESTS 18 46 204800 1500
75533592 vjudge5 C April 5, 2020, 4:39 a.m. OK GNU C++17 TESTS 18 46 204800 1500
75058958 h4rdlyfunc710n4l C April 1, 2020, 8:56 a.m. OK GNU C++17 TESTS 18 46 204800 1500
74985635 Kevin7z C March 31, 2020, 3:37 p.m. OK GNU C++17 TESTS 18 46 204800 1500
74980435 oY_Yo C March 31, 2020, 3:23 p.m. OK GNU C++17 TESTS 18 46 204800 1500
74979959 JBer C March 31, 2020, 3:21 p.m. OK GNU C++17 TESTS 18 46 204800 1500
74979700 Mint_Choco C March 31, 2020, 3:21 p.m. OK GNU C++17 TESTS 18 46 204800 1500
75310764 conquerorArpit C April 3, 2020, 5:27 a.m. OK GNU C++17 (64) TESTS 18 31 512000 1500
75350111 IgorSmirnov C April 3, 2020, 1:57 p.m. OK GNU C++17 (64) TESTS 18 31 10854400 1500
75016447 ecnerwala C March 31, 2020, 7:50 p.m. OK GNU C++17 (64) TESTS 18 46 512000 1500
75001849 idgaf_99 C March 31, 2020, 5:25 p.m. OK GNU C++17 (64) TESTS 18 46 512000 1500
75310596 conquerorArpit C April 3, 2020, 5:24 a.m. OK GNU C++17 (64) TESTS 18 46 512000 1500
75567194 sourabhgol1999 C April 5, 2020, 12:20 p.m. OK GNU C++17 (64) TESTS 18 46 512000 1500
75032575 WGree C April 1, 2020, 2:27 a.m. OK GNU C++17 (64) TESTS 18 46 1331200 1500
75650719 ir_1st_vil C April 6, 2020, 11:30 a.m. OK GNU C++17 (64) TESTS 18 46 10547200 1500
75182328 essi C April 1, 2020, 9:03 p.m. OK GNU C++17 (64) TESTS 18 46 10956800 1500
75005412 vishnu_m C March 31, 2020, 5:58 p.m. OK GNU C++17 (64) TESTS 18 46 14233600 1500
75188921 pohzipohzi C April 1, 2020, 11:44 p.m. OK Go TESTS 18 93 9011200 1500
75188951 pohzipohzi C April 1, 2020, 11:45 p.m. OK Go TESTS 18 108 6041600 1500
75189459 pohzipohzi C April 2, 2020, 12:02 a.m. OK Go TESTS 18 108 9625600 1500
75065655 synapse C April 1, 2020, 10:08 a.m. OK Go TESTS 18 124 204800 1500
75188694 pohzipohzi C April 1, 2020, 11:36 p.m. OK Go TESTS 18 124 276992000 1500
76039901 vioreld C April 9, 2020, 9:26 p.m. OK Go TESTS 18 390 10444800 1500
74986050 keshu6598 C March 31, 2020, 3:38 p.m. OK Go TESTS 18 467 4608000 1500
75616736 Russell_Emerine C April 6, 2020, 1:53 a.m. OK Haskell TESTS 18 327 23142400 1500
75074321 happy15 C April 1, 2020, 11:40 a.m. OK Java 11 TESTS 18 187 0 1500
75933059 shallotwang129 C April 8, 2020, 9:37 p.m. OK Java 11 TESTS 18 202 0 1500
75714513 alankritanand001 C April 7, 2020, 5:47 a.m. OK Java 11 TESTS 18 218 0 1500
76048675 sajith C April 10, 2020, 1:57 a.m. OK Java 11 TESTS 18 233 0 1500
74980956 GiantTornado C March 31, 2020, 3:24 p.m. OK Java 11 TESTS 18 233 0 1500
75006181 Raj9400 C March 31, 2020, 6:05 p.m. OK Java 11 TESTS 18 233 7270400 1500
75004108 Ourobouro91 C March 31, 2020, 5:45 p.m. OK Java 11 TESTS 18 233 7372800 1500
75844610 nt_7 C April 8, 2020, 2:34 p.m. OK Java 11 TESTS 18 248 0 1500
75349572 D2XP C April 3, 2020, 1:51 p.m. OK Java 11 TESTS 18 249 0 1500
75088258 emmalachaitanya C April 1, 2020, 2:03 p.m. OK Java 11 TESTS 18 249 11980800 1500
75058553 shubhamandro C April 1, 2020, 8:51 a.m. OK Java 8 TESTS 18 124 0 1500
75206990 manu1996 C April 2, 2020, 6:18 a.m. OK Java 8 TESTS 18 124 0 1500
75023091 pramit1998 C March 31, 2020, 9:49 p.m. OK Java 8 TESTS 18 124 0 1500
75017751 kareem3id C March 31, 2020, 8:09 p.m. OK Java 8 TESTS 18 124 5120000 1500
76318424 marcose18 C April 12, 2020, 10:57 a.m. OK Java 8 TESTS 18 139 0 1500
75050167 horseprabhat625 C April 1, 2020, 7:10 a.m. OK Java 8 TESTS 18 139 0 1500
75044580 amolpratap007 C April 1, 2020, 6:08 a.m. OK Java 8 TESTS 18 139 0 1500
75003757 jrishabh99 C March 31, 2020, 5:42 p.m. OK Java 8 TESTS 18 139 0 1500
75051108 bluesky111 C April 1, 2020, 7:22 a.m. OK Java 8 TESTS 18 139 4403200 1500
75204502 In_The_Name_Of_Love C April 2, 2020, 5:41 a.m. OK Java 8 TESTS 18 139 5120000 1500
75018277 rndg C March 31, 2020, 8:16 p.m. OK JavaScript TESTS 18 1091 3276800 1500
75060210 Spheniscine C April 1, 2020, 9:09 a.m. OK Kotlin TESTS 18 186 7987200 1500
74979741 sid9406 C March 31, 2020, 3:21 p.m. OK Kotlin TESTS 18 982 716800 1500
75087299 bohuss C April 1, 2020, 1:53 p.m. OK Kotlin TESTS 18 1029 16281600 1500
75005509 bati06 C March 31, 2020, 5:58 p.m. OK Mono C# TESTS 18 733 6963200 1500
74993599 koosmarci C March 31, 2020, 4 p.m. OK Mono C# TESTS 18 764 6860800 1500
75007104 tvvister C March 31, 2020, 6:16 p.m. OK Mono C# TESTS 18 858 33996800 1500
75034076 vjudge5 C April 1, 2020, 3:02 a.m. OK MS C++ TESTS 18 46 1024000 1500
76020611 NotEvenWrong C April 9, 2020, 5:23 p.m. OK MS C++ TESTS 18 61 204800 1500
75535075 vjudge1 C April 5, 2020, 5:14 a.m. OK MS C++ TESTS 18 61 204800 1500
75078762 vjudge3 C April 1, 2020, 12:29 p.m. OK MS C++ TESTS 18 61 204800 1500
75433269 onder99 C April 3, 2020, 8:03 p.m. OK MS C++ TESTS 18 61 512000 1500
75432984 pastafaryan C April 3, 2020, 7:58 p.m. OK MS C++ TESTS 18 61 614400 1500
75806788 vjudge2 C April 8, 2020, 6:21 a.m. OK MS C++ TESTS 18 61 24268800 1500
75535248 vjudge4 C April 5, 2020, 5:18 a.m. OK MS C++ TESTS 18 62 204800 1500
74979664 laboba C March 31, 2020, 3:20 p.m. OK MS C++ TESTS 18 77 512000 1500
75035821 vjudge2 C April 1, 2020, 3:43 a.m. OK MS C++ TESTS 18 358 204800 1500
74985372 Bryannoel C March 31, 2020, 3:36 p.m. OK MS C++ 2017 TESTS 18 62 25088000 1500
75535540 vjudge1 C April 5, 2020, 5:23 a.m. OK MS C++ 2017 TESTS 18 77 204800 1500
74982130 Cube219 C March 31, 2020, 3:26 p.m. OK MS C++ 2017 TESTS 18 77 409600 1500
75310431 hwqconceptnick C April 3, 2020, 5:21 a.m. OK MS C++ 2017 TESTS 18 78 204800 1500
75433227 pastafaryan C April 3, 2020, 8:02 p.m. OK MS C++ 2017 TESTS 18 78 614400 1500
75032811 Kicey C April 1, 2020, 2:33 a.m. OK MS C++ 2017 TESTS 18 78 21094400 1500
75039807 vjudge5 C April 1, 2020, 5:01 a.m. OK MS C++ 2017 TESTS 18 93 21094400 1500
75586076 TMHazem C April 5, 2020, 3:57 p.m. OK MS C++ 2017 TESTS 18 108 42291200 1500
75433294 onder99 C April 3, 2020, 8:03 p.m. OK MS C++ 2017 TESTS 18 109 614400 1500
76066139 naitsabes.ezluhcs C April 10, 2020, 7:39 a.m. OK MS C++ 2017 TESTS 18 124 22118400 1500
75057655 vjudge1 C April 1, 2020, 8:41 a.m. OK Node.js TESTS 18 1185 32870400 1500
75046807 snape_here C April 1, 2020, 6:34 a.m. OK PyPy 2 TESTS 18 218 7577600 1500
75038780 Gaurav1 C April 1, 2020, 4:41 a.m. OK PyPy 2 TESTS 18 249 4300800 1500
74980977 short_contest C March 31, 2020, 3:24 p.m. OK PyPy 2 TESTS 18 265 9728000 1500
75167735 shanu_im C April 1, 2020, 5:52 p.m. OK PyPy 2 TESTS 18 280 9728000 1500
75015110 chaudhary_19 C March 31, 2020, 7:30 p.m. OK PyPy 2 TESTS 18 389 388915200 1500
74979278 bazzyadb C March 31, 2020, 3:19 p.m. OK PyPy 2 TESTS 18 561 5324800 1500
76044273 beethoven97 C April 9, 2020, 11:16 p.m. OK PyPy 2 TESTS 18 717 24371200 1500
75611106 wolffd C April 5, 2020, 10:26 p.m. OK PyPy 2 TESTS 18 1184 9420800 1500
75005284 11fingers C March 31, 2020, 5:56 p.m. OK PyPy 2 TESTS 18 1606 11673600 1500
76044231 beethoven97 C April 9, 2020, 11:15 p.m. OK PyPy 2 TESTS 18 1653 24576000 1500
75071901 snape_here C April 1, 2020, 11:14 a.m. OK PyPy 3 TESTS 18 249 9113600 1500
75441141 PracticeAccountICL C April 3, 2020, 10:31 p.m. OK PyPy 3 TESTS 18 264 5324800 1500
75000592 anishde85 C March 31, 2020, 5:15 p.m. OK PyPy 3 TESTS 18 264 8294400 1500
75024661 EliteLabyrinth C March 31, 2020, 10:27 p.m. OK PyPy 3 TESTS 18 295 5222400 1500
75055354 sam997 C April 1, 2020, 8:13 a.m. OK PyPy 3 TESTS 18 295 9318400 1500
75936695 eztso C April 8, 2020, 11:09 p.m. OK PyPy 3 TESTS 18 295 9523200 1500
74994736 adivannik C March 31, 2020, 4:03 p.m. OK PyPy 3 TESTS 18 312 13209600 1500
75068736 kishan2343532 C April 1, 2020, 10:40 a.m. OK PyPy 3 TESTS 18 326 9216000 1500
75187651 omarnvidia C April 1, 2020, 11:02 p.m. OK PyPy 3 TESTS 18 326 18329600 1500
75057887 runnie C April 1, 2020, 8:44 a.m. OK PyPy 3 TESTS 18 327 9420800 1500
74991603 Cifko C March 31, 2020, 3:55 p.m. OK Python 2 TESTS 18 701 3686400 1500
75017140 ComptineDunAutreEte C March 31, 2020, 8:01 p.m. OK Python 2 TESTS 18 1045 5939200 1500
75089707 sangonana C April 1, 2020, 2:16 p.m. OK Python 3 TESTS 18 702 1024000 1500
75240756 purple_haze1 C April 2, 2020, 12:55 p.m. OK Python 3 TESTS 18 763 2969600 1500
75085350 jha_saurav C April 1, 2020, 1:35 p.m. OK Python 3 TESTS 18 795 5529600 1500
75239843 purple_haze1 C April 2, 2020, 12:48 p.m. OK Python 3 TESTS 18 826 2969600 1500
75028998 divyansh_io C April 1, 2020, 12:41 a.m. OK Python 3 TESTS 18 873 6451200 1500
75014086 pa.n.ik C March 31, 2020, 7:16 p.m. OK Python 3 TESTS 18 889 215961600 1500
75233602 jha_saurav C April 2, 2020, 11:48 a.m. OK Python 3 TESTS 18 950 5120000 1500
75625744 kata_ko-to C April 6, 2020, 5:25 a.m. OK Python 3 TESTS 18 950 6553600 1500
75029077 divyansh_io C April 1, 2020, 12:43 a.m. OK Python 3 TESTS 18 951 1843200 1500
75028909 divyansh_io C April 1, 2020, 12:38 a.m. OK Python 3 TESTS 18 951 1843200 1500
76010008 tbogus C April 9, 2020, 3:51 p.m. OK Ruby TESTS 18 468 716800 1500
76030720 tbogus C April 9, 2020, 7:06 p.m. OK Ruby TESTS 18 499 819200 1500
74988307 molety C March 31, 2020, 3:45 p.m. OK Ruby TESTS 18 545 921600 1500
75003341 cotton100pc C March 31, 2020, 5:38 p.m. OK Rust TESTS 18 62 921600 1500
75033617 kobae964 C April 1, 2020, 2:51 a.m. OK Rust TESTS 18 109 3891200 1500

remove filters

Back to search problems