Codeforces Round 910 (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
1898 Codeforces Round 910 (Div. 2) FINISHED False 7200 36775463 Nov. 19, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16286 ) A Milica and String PROGRAMMING brute force implementation strings

B"Milica has a string s of length n , consisting only of characters A and B. She wants to modify s so it contains exactly k instances of B. In one operation, she can do the following: Milica does not want to perform too many operations in order not to waste too much time on them. She asks you to find the minimum number of operations required to modify s so it contains exactly k instances of B. She also wants you to find these operations (that is, integer i and character c selected in each operation). Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= q t <= q 500 ). The description of test cases follows. The first line of each test case contains two integers n and k ( 3 <= q n <= q 100 , 0 <= q k <= q n ) -- the length of the string s and the number of characters B Milica wants to appear in s in the end. The second line of each test case contains the string s of length n , consisting only of characters A and B. For each test case, in the first line output a single integer m -- the minimum number of operations Milica should perform. In the j -th of the next m lines output an integer i ( 1 <= i <= n ) and a character c ( c is 'A' or 'B') -- the parameters of the j -th operation as described in the statement. If there are multiple solutions with the minimum possible number of operations, output any of them. In the first test case, there are already 2 characters B in s , so Milica does not have to perform any operations. In the second test case, the only way to achieve 3 characters B in s in one operation is to replace the first character of s by B on the first operation: AABAB rightarrow BABAB. In the third test case, the only way to achieve 0 characters B in s in one operation is to replace the first 5 character"...

Tutorials

Editorial for Codeforces Round #910 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
233502069 De-Bug A Nov. 19, 2023, 10:01 p.m. OK C# 10 TESTS 8 31 409600
233521004 sh_arman A Nov. 20, 2023, 5:41 a.m. OK C# 10 TESTS 8 62 409600
233466053 saitcakir A Nov. 19, 2023, 4:12 p.m. OK C# 10 TESTS 8 62 819200
233502507 bluemegane A Nov. 19, 2023, 10:12 p.m. OK C# 8 TESTS 8 186 3276800
233482348 D-R-2004 A Nov. 19, 2023, 5:47 p.m. OK Clang++17 Diagnostics TESTS 8 46 0
233516700 lldhh A Nov. 20, 2023, 4:29 a.m. OK Clang++20 Diagnostics TESTS 8 46 0
233477396 Relake A Nov. 19, 2023, 5:04 p.m. OK Clang++20 Diagnostics TESTS 8 62 0
233518312 Annikla A Nov. 20, 2023, 4:58 a.m. OK Clang++20 Diagnostics TESTS 8 62 0
233518096 Sinking_tenderness A Nov. 20, 2023, 4:55 a.m. OK GNU C11 TESTS 8 15 0
233466336 roy.aavas A Nov. 19, 2023, 4:12 p.m. OK GNU C11 TESTS 8 15 0
233468881 syedtahir04 A Nov. 19, 2023, 4:20 p.m. OK GNU C11 TESTS 8 15 0
233508516 Maoluda_64 A Nov. 20, 2023, 1:20 a.m. OK GNU C11 TESTS 8 15 0
233469236 Mohanned665 A Nov. 19, 2023, 4:21 p.m. OK GNU C11 TESTS 8 30 0
233488640 Aryan_234 A Nov. 19, 2023, 6:51 p.m. OK GNU C11 TESTS 8 31 0
233491709 Hadis_006_SUST A Nov. 19, 2023, 7:27 p.m. OK GNU C11 TESTS 8 31 0
233496727 BitMap4 A Nov. 19, 2023, 8:31 p.m. OK GNU C11 TESTS 8 31 0
233511285 immortal_21 A Nov. 20, 2023, 2:33 a.m. OK GNU C11 TESTS 8 31 0
233481573 11Raghav A Nov. 19, 2023, 5:39 p.m. OK GNU C11 TESTS 8 31 0
233483476 2c237c6 A Nov. 19, 2023, 5:58 p.m. OK GNU C++14 TESTS 8 0 0
233484213 Ausaf_Hasib A Nov. 19, 2023, 6:06 p.m. OK GNU C++14 TESTS 8 0 0
233489518 krishrawat A Nov. 19, 2023, 7 p.m. OK GNU C++14 TESTS 8 0 0
233494646 omeganot A Nov. 19, 2023, 8:03 p.m. OK GNU C++14 TESTS 8 0 0
233494984 adarsh9306 A Nov. 19, 2023, 8:07 p.m. OK GNU C++14 TESTS 8 0 0
233504723 trieuvimely A Nov. 19, 2023, 11:14 p.m. OK GNU C++14 TESTS 8 0 0
233506815 mike_frank11 A Nov. 20, 2023, 12:24 a.m. OK GNU C++14 TESTS 8 0 0
233507359 BBD186587 A Nov. 20, 2023, 12:44 a.m. OK GNU C++14 TESTS 8 0 0
233515570 peter112358 A Nov. 20, 2023, 4:05 a.m. OK GNU C++14 TESTS 8 0 0
233519013 TTKX999 A Nov. 20, 2023, 5:10 a.m. OK GNU C++14 TESTS 8 0 0
233521204 Sci_fur A Nov. 20, 2023, 5:44 a.m. OK GNU C++17 TESTS 8 0 0
233521149 make_str A Nov. 20, 2023, 5:43 a.m. OK GNU C++17 TESTS 8 0 0
233519963 parth_17 A Nov. 20, 2023, 5:25 a.m. OK GNU C++17 TESTS 8 0 0
233519142 Kyrizer_W A Nov. 20, 2023, 5:12 a.m. OK GNU C++17 TESTS 8 0 0
233516739 Siddharth71 A Nov. 20, 2023, 4:30 a.m. OK GNU C++17 TESTS 8 0 0
233516466 uttamm_19 A Nov. 20, 2023, 4:24 a.m. OK GNU C++17 TESTS 8 0 0
233515798 __Broly__ A Nov. 20, 2023, 4:10 a.m. OK GNU C++17 TESTS 8 0 0
233514883 EzuRohit A Nov. 20, 2023, 3:49 a.m. OK GNU C++17 TESTS 8 0 0
233509665 flandre.scarlet A Nov. 20, 2023, 1:53 a.m. OK GNU C++17 TESTS 8 0 0
233509380 haesb A Nov. 20, 2023, 1:45 a.m. OK GNU C++17 TESTS 8 0 0
233510393 niqiqi A Nov. 20, 2023, 2:12 a.m. OK GNU C++17 (64) TESTS 8 0 0
233519476 _Cx330 A Nov. 20, 2023, 5:17 a.m. OK GNU C++17 (64) TESTS 8 0 0
233516682 lin_jy A Nov. 20, 2023, 4:29 a.m. OK GNU C++17 (64) TESTS 8 0 0
233514411 imsuck12 A Nov. 20, 2023, 3:41 a.m. OK GNU C++17 (64) TESTS 8 0 0
233511610 z01prime A Nov. 20, 2023, 2:41 a.m. OK GNU C++17 (64) TESTS 8 0 0
233504004 DrWolowitz A Nov. 19, 2023, 10:54 p.m. OK GNU C++17 (64) TESTS 8 0 0
233493100 MH_Nazmul A Nov. 19, 2023, 7:44 p.m. OK GNU C++17 (64) TESTS 8 0 0
233489746 rock_lock A Nov. 19, 2023, 7:03 p.m. OK GNU C++17 (64) TESTS 8 0 0
233483676 GreatRoboCreator A Nov. 19, 2023, 6 p.m. OK GNU C++17 (64) TESTS 8 0 0
233521781 Legend_dy A Nov. 20, 2023, 5:53 a.m. OK GNU C++17 (64) TESTS 8 15 0
233517995 arpitblagan27 A Nov. 20, 2023, 4:53 a.m. OK GNU C++20 (64) TESTS 8 0 0
233518380 Hi-TechMissile A Nov. 20, 2023, 5 a.m. OK GNU C++20 (64) TESTS 8 0 0
233518748 xjynb A Nov. 20, 2023, 5:06 a.m. OK GNU C++20 (64) TESTS 8 0 0
233519244 buxiang-qichuang A Nov. 20, 2023, 5:14 a.m. OK GNU C++20 (64) TESTS 8 0 0
233519731 Sam_Jiang A Nov. 20, 2023, 5:21 a.m. OK GNU C++20 (64) TESTS 8 0 0
233520017 unknownnnn001 A Nov. 20, 2023, 5:26 a.m. OK GNU C++20 (64) TESTS 8 0 0
233520905 Mayank_ssm A Nov. 20, 2023, 5:40 a.m. OK GNU C++20 (64) TESTS 8 0 0
233521368 DarkSudo A Nov. 20, 2023, 5:46 a.m. OK GNU C++20 (64) TESTS 8 0 0
233522019 erukula_rajasree A Nov. 20, 2023, 5:57 a.m. OK GNU C++20 (64) TESTS 8 0 0
233517753 JellyFishy A Nov. 20, 2023, 4:49 a.m. OK GNU C++20 (64) TESTS 8 0 0
233489713 1406100039 A Nov. 19, 2023, 7:03 p.m. OK Go TESTS 8 15 512000
233461458 dils2k A Nov. 19, 2023, 3:57 p.m. OK Go TESTS 8 155 102400
233503706 vstiff A Nov. 19, 2023, 10:45 p.m. OK Haskell TESTS 8 30 0
233516140 powervic08 A Nov. 20, 2023, 4:18 a.m. OK Java 11 TESTS 8 217 0
233509567 Hang_We_Hong A Nov. 20, 2023, 1:50 a.m. OK Java 11 TESTS 8 233 0
233500391 khouya A Nov. 19, 2023, 9:29 p.m. OK Java 11 TESTS 8 233 0
233467059 deekshita318 A Nov. 19, 2023, 4:15 p.m. OK Java 11 TESTS 8 249 0
233490327 DessertRommet A Nov. 19, 2023, 7:10 p.m. OK Java 11 TESTS 8 249 0
233518095 rohitrokz29 A Nov. 20, 2023, 4:55 a.m. OK Java 11 TESTS 8 264 0
233472426 coadingcat A Nov. 19, 2023, 4:31 p.m. OK Java 11 TESTS 8 264 0
233461423 lorem07 A Nov. 19, 2023, 3:56 p.m. OK Java 11 TESTS 8 311 0
233470472 hlcyon A Nov. 19, 2023, 4:25 p.m. OK Java 17 TESTS 8 202 0
233464292 vamshikrish1303 A Nov. 19, 2023, 4:06 p.m. OK Java 17 TESTS 8 202 0
233491133 ShresCodes A Nov. 19, 2023, 7:19 p.m. OK Java 17 TESTS 8 218 512000
233466919 jmo448 A Nov. 19, 2023, 4:14 p.m. OK Java 17 TESTS 8 218 614400
233479342 Prime369 A Nov. 19, 2023, 5:19 p.m. OK Java 17 TESTS 8 249 716800
233467814 Chandana_6 A Nov. 19, 2023, 4:17 p.m. OK Java 17 TESTS 8 280 716800
233486467 Zigguyli A Nov. 19, 2023, 6:28 p.m. OK Java 17 TESTS 8 296 819200
233486127 ak959 A Nov. 19, 2023, 6:24 p.m. OK Java 17 TESTS 8 311 819200
233487166 Zigguyli A Nov. 19, 2023, 6:35 p.m. OK Java 17 TESTS 8 327 921600
233461077 k_zzz A Nov. 19, 2023, 3:56 p.m. OK Java 17 TESTS 8 342 716800
233477462 Mohamed-Hassan-Esmael A Nov. 19, 2023, 5:04 p.m. OK Java 21 TESTS 8 280 102400
233486136 RatanK A Nov. 19, 2023, 6:24 p.m. OK Java 21 TESTS 8 280 512000
233494725 munaganithin.mnk A Nov. 19, 2023, 8:04 p.m. OK Java 21 TESTS 8 342 0
233462087 MAFIA29 A Nov. 19, 2023, 3:59 p.m. OK Java 21 TESTS 8 342 512000
233463511 priyanshuwu A Nov. 19, 2023, 4:04 p.m. OK Java 21 TESTS 8 373 204800
233477268 Kenzhezhan A Nov. 19, 2023, 5:03 p.m. OK Java 8 TESTS 8 77 0
233501681 Koka A Nov. 19, 2023, 9:54 p.m. OK Java 8 TESTS 8 93 0
233478685 Mohamed_Ahmed A Nov. 19, 2023, 5:13 p.m. OK Java 8 TESTS 8 109 0
233467249 shaishave A Nov. 19, 2023, 4:15 p.m. OK Java 8 TESTS 8 124 0
233475771 _ShenHua_ A Nov. 19, 2023, 4:54 p.m. OK Java 8 TESTS 8 139 0
233476175 Sumitsingh7 A Nov. 19, 2023, 4:56 p.m. OK Java 8 TESTS 8 140 5836800
233521102 rahulsingh231841 A Nov. 20, 2023, 5:43 a.m. OK Java 8 TESTS 8 155 0
233515663 Chandhu_13 A Nov. 20, 2023, 4:07 a.m. OK Java 8 TESTS 8 155 0
233515506 Kartik2005 A Nov. 20, 2023, 4:03 a.m. OK Java 8 TESTS 8 155 0
233512077 priyaroy3370 A Nov. 20, 2023, 2:53 a.m. OK Java 8 TESTS 8 155 0
233520977 Ravitosh A Nov. 20, 2023, 5:41 a.m. OK MS C++ 2017 TESTS 8 15 0
233473039 rk001233 A Nov. 19, 2023, 4:32 p.m. OK MS C++ 2017 TESTS 8 15 0
233465856 180bighandsome A Nov. 19, 2023, 4:11 p.m. OK MS C++ 2017 TESTS 8 15 0
233463655 Icarus___ A Nov. 19, 2023, 4:04 p.m. OK MS C++ 2017 TESTS 8 15 0
233461412 Lu_Kai A Nov. 19, 2023, 3:56 p.m. OK MS C++ 2017 TESTS 8 15 0
233468338 onedriection A Nov. 19, 2023, 4:19 p.m. OK MS C++ 2017 TESTS 8 30 0
233478617 AvanSingh A Nov. 19, 2023, 5:13 p.m. OK MS C++ 2017 TESTS 8 31 0
233507847 Keval_78 A Nov. 20, 2023, 12:58 a.m. OK PyPy 3 TESTS 8 109 67891200
233478362 kashish_garg A Nov. 19, 2023, 5:11 p.m. OK PyPy 3 TESTS 8 155 3993600
233476209 FahimSifnatul A Nov. 19, 2023, 4:56 p.m. OK PyPy 3 TESTS 8 170 5632000
233465725 Pritesh_A0 A Nov. 19, 2023, 4:10 p.m. OK PyPy 3 TESTS 8 186 5120000
233499651 Ali_2630 A Nov. 19, 2023, 9:15 p.m. OK PyPy 3 TESTS 8 202 4505600
233484422 Kshitiz_san A Nov. 19, 2023, 6:08 p.m. OK PyPy 3 TESTS 8 217 5734400
233513464 zronghui A Nov. 20, 2023, 3:22 a.m. OK PyPy 3 TESTS 8 264 7782400
233479172 VitalyKo A Nov. 19, 2023, 5:17 p.m. OK PyPy 3-64 TESTS 8 93 3891200
233476363 RobinFromTheHood A Nov. 19, 2023, 4:57 p.m. OK PyPy 3-64 TESTS 8 93 5632000
233487955 gardengnome A Nov. 19, 2023, 6:44 p.m. OK PyPy 3-64 TESTS 8 108 4403200
233489773 MenaceJn A Nov. 19, 2023, 7:04 p.m. OK PyPy 3-64 TESTS 8 108 5836800
233478944 HABVIP A Nov. 19, 2023, 5:15 p.m. OK PyPy 3-64 TESTS 8 108 6758400
233495970 Mohamed-_-Gamal A Nov. 19, 2023, 8:20 p.m. OK PyPy 3-64 TESTS 8 109 5017600
233479217 BlueberryPieKyle A Nov. 19, 2023, 5:18 p.m. OK PyPy 3-64 TESTS 8 124 5324800
233505125 imsnto A Nov. 19, 2023, 11:26 p.m. OK PyPy 3-64 TESTS 8 124 6963200
233496464 AYMEN.N.C A Nov. 19, 2023, 8:27 p.m. OK PyPy 3-64 TESTS 8 124 7372800
233476314 dima_reshala2009 A Nov. 19, 2023, 4:57 p.m. OK PyPy 3-64 TESTS 8 124 8192000
233481640 Sa_Shafin A Nov. 19, 2023, 5:40 p.m. OK Python 3 TESTS 8 31 102400
233520829 tan36 A Nov. 20, 2023, 5:39 a.m. OK Python 3 TESTS 8 46 0
233481283 AgentTanvir A Nov. 19, 2023, 5:36 p.m. OK Python 3 TESTS 8 46 0
233477742 Zappricious A Nov. 19, 2023, 5:06 p.m. OK Python 3 TESTS 8 46 0
233468983 Salamandern A Nov. 19, 2023, 4:21 p.m. OK Python 3 TESTS 8 46 0
233461898 rashed_sajib A Nov. 19, 2023, 3:58 p.m. OK Python 3 TESTS 8 46 0
233517685 code-king A Nov. 20, 2023, 4:48 a.m. OK Python 3 TESTS 8 46 102400
233498088 madhu13180 A Nov. 19, 2023, 8:51 p.m. OK Python 3 TESTS 8 46 102400
233491325 vishnu_sathwik A Nov. 19, 2023, 7:22 p.m. OK Python 3 TESTS 8 46 102400
233490486 codingwithboba10 A Nov. 19, 2023, 7:11 p.m. OK Python 3 TESTS 8 46 102400
233506688 0x81 A Nov. 20, 2023, 12:20 a.m. OK Ruby 3 TESTS 8 467 921600
233497901 jyom A Nov. 19, 2023, 8:48 p.m. OK Rust 2021 TESTS 8 15 102400
233464904 amranilara A Nov. 19, 2023, 4:08 p.m. OK Rust 2021 TESTS 8 30 0

remove filters

Back to search problems