Codeforces Round 855 (Div. 3)

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
1800 Codeforces Round 855 (Div. 3) FINISHED False 8100 59498663 March 2, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 25933 ) B Count the Number of Pairs PROGRAMMING greedy strings

B'Kristina has a string s of length n , consisting only of lowercase and uppercase Latin letters. For each pair of lowercase letter and its matching uppercase letter, Kristina can get 1 burl. However, pairs of characters cannot overlap, so each character can only be in one pair. For example, if she has the string s = "aAaaBACacbE", she can get a burl for the following character pairs: Kristina wants to get more burles for her string, so she is going to perform no more than k operations on it. In one operation, she can: For example, when k = 2 and s = "aAaaBACacbE" it can perform one operation: choose s_3 = "a" and make it uppercase. Then she will get another pair of s_3 = "A" and s_8 = "a" Find maximum number of burles Kristina can get for her string. The first line of input data contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains two integers n ( 1 <= n <= 2 cdot 10^5 ) and k ( 0 <= k <= n ) -- the number of characters in the string and the maximum number of operations that can be performed on it. The second line of each test case contains a string s of length n , consisting only of lowercase and uppercase Latin letters. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print exactly one integer on a separate line: the maximum number of burles that Kristina can get for her string s . The first test case is explained in the problem statement. In the second test case, it is not possible to get any pair by performing any number of operations. '...

Tutorials

Codeforces Round 855 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
195713059 PavolKoman B March 2, 2023, 5:46 p.m. OK C# 10 TESTS 6 61 1536000
195745179 mban259 B March 3, 2023, 1:18 a.m. OK C# 10 TESTS 18 62 3072000
195745808 bluemegane B March 3, 2023, 1:32 a.m. OK C# 8 TESTS 18 124 2867200
195734428 VasuGarg2211 B March 2, 2023, 9:14 p.m. OK Clang++17 Diagnostics TESTS 6 841 13004800
195734857 VasuGarg2211 B March 2, 2023, 9:22 p.m. OK Clang++17 Diagnostics TESTS 6 857 13004800
195734605 VasuGarg2211 B March 2, 2023, 9:17 p.m. OK Clang++17 Diagnostics TESTS 6 1076 13004800
195747054 Awesome3.14 B March 3, 2023, 1:59 a.m. OK D TESTS 18 31 4403200
195710047 asm_rayhan B March 2, 2023, 5:26 p.m. OK GNU C11 TESTS 6 46 204800
195754681 under_cover_ B March 3, 2023, 4:22 a.m. OK GNU C11 TESTS 18 46 204800
195734021 MooNaz B March 2, 2023, 9:08 p.m. OK GNU C11 TESTS 6 46 204800
195709341 LR_Wahid B March 2, 2023, 5:22 p.m. OK GNU C11 TESTS 6 46 204800
195746718 Smallorange B March 3, 2023, 1:52 a.m. OK GNU C11 TESTS 18 62 204800
195762473 wjx12 B March 3, 2023, 6 a.m. OK GNU C++14 TESTS 18 15 204800
195747850 santanhuahewu B March 3, 2023, 2:19 a.m. OK GNU C++14 TESTS 18 15 204800
195742883 YoungJayz B March 3, 2023, 12:26 a.m. OK GNU C++14 TESTS 6 15 512000
195738849 max5hev B March 2, 2023, 10:44 p.m. OK GNU C++14 TESTS 6 15 512000
195731967 Rawan_Almashad B March 2, 2023, 8:39 p.m. OK GNU C++14 TESTS 6 15 512000
195744545 Xanadu13 B March 3, 2023, 1:04 a.m. OK GNU C++14 TESTS 18 15 512000
195748073 ankur1 B March 3, 2023, 2:24 a.m. OK GNU C++14 TESTS 18 15 512000
195751180 SchezoSchezo B March 3, 2023, 3:20 a.m. OK GNU C++14 TESTS 18 15 512000
195759308 chy12321 B March 3, 2023, 5:23 a.m. OK GNU C++14 TESTS 18 15 512000
195744166 TralSun B March 3, 2023, 12:55 a.m. OK GNU C++14 TESTS 18 15 512000
195735247 Ryazimn B March 2, 2023, 9:30 p.m. OK GNU C++17 TESTS 6 0 512000
195719265 Mostafa_Ayed1 B March 2, 2023, 6:32 p.m. OK GNU C++17 TESTS 6 0 512000
195741782 Longqiang B March 2, 2023, 11:58 p.m. OK GNU C++17 TESTS 6 15 0
195729109 Omargad B March 2, 2023, 8:03 p.m. OK GNU C++17 TESTS 6 15 0
195750001 cfdatas B March 3, 2023, 2:59 a.m. OK GNU C++17 TESTS 18 15 204800
195737182 shimaaughh B March 2, 2023, 10:08 p.m. OK GNU C++17 TESTS 6 15 204800
195724172 ValeraShav B March 2, 2023, 7:14 p.m. OK GNU C++17 TESTS 6 15 204800
195743073 finalissima B March 3, 2023, 12:30 a.m. OK GNU C++17 TESTS 6 15 204800
195762273 BeruboIV B March 3, 2023, 5:57 a.m. OK GNU C++17 TESTS 18 15 512000
195761985 syntaxSavior B March 3, 2023, 5:54 a.m. OK GNU C++17 TESTS 18 15 512000
195722745 CaptainLong188 B March 2, 2023, 7:01 p.m. OK GNU C++17 (64) TESTS 6 15 512000
195746650 hsekharsahoo B March 3, 2023, 1:51 a.m. OK GNU C++17 (64) TESTS 18 15 512000
195745909 drdilyor B March 3, 2023, 1:34 a.m. OK GNU C++17 (64) TESTS 18 15 512000
195744507 s7win99 B March 3, 2023, 1:03 a.m. OK GNU C++17 (64) TESTS 18 15 512000
195742952 naveenvarma600 B March 3, 2023, 12:27 a.m. OK GNU C++17 (64) TESTS 6 15 512000
195731145 ankancool B March 2, 2023, 8:28 p.m. OK GNU C++17 (64) TESTS 6 15 512000
195728409 billgatos B March 2, 2023, 7:56 p.m. OK GNU C++17 (64) TESTS 6 15 512000
195720690 MaGnsi0 B March 2, 2023, 6:43 p.m. OK GNU C++17 (64) TESTS 6 15 512000
195719888 CaptainLong188 B March 2, 2023, 6:37 p.m. OK GNU C++17 (64) TESTS 6 15 512000
195740784 RH_Shaudho B March 2, 2023, 11:31 p.m. OK GNU C++17 (64) TESTS 6 30 512000
195716486 sam86_b B March 2, 2023, 6:11 p.m. OK GNU C++20 (64) TESTS 6 0 512000
195709916 fxfxxxfxx B March 2, 2023, 5:25 p.m. OK GNU C++20 (64) TESTS 6 0 512000
195716911 abdalkreem_bzoor B March 2, 2023, 6:14 p.m. OK GNU C++20 (64) TESTS 6 0 512000
195720055 RandomXBoy B March 2, 2023, 6:38 p.m. OK GNU C++20 (64) TESTS 6 0 512000
195720607 ASH0705 B March 2, 2023, 6:42 p.m. OK GNU C++20 (64) TESTS 6 0 512000
195729972 Proofy B March 2, 2023, 8:14 p.m. OK GNU C++20 (64) TESTS 6 0 512000
195754930 medtik B March 3, 2023, 4:26 a.m. OK GNU C++20 (64) TESTS 18 0 512000
195735794 Omarfarhan B March 2, 2023, 9:40 p.m. OK GNU C++20 (64) TESTS 6 15 0
195725732 kolomig0r B March 2, 2023, 7:29 p.m. OK GNU C++20 (64) TESTS 6 15 0
195739303 AhmedGalal B March 2, 2023, 10:54 p.m. OK GNU C++20 (64) TESTS 6 15 0
195728621 pakkapapad B March 2, 2023, 7:58 p.m. OK Java 11 TESTS 6 186 0
195757938 __Serendipity B March 3, 2023, 5:06 a.m. OK Java 11 TESTS 18 187 0
195718424 ilasiawo B March 2, 2023, 6:25 p.m. OK Java 11 TESTS 6 217 0
195719601 dzhi B March 2, 2023, 6:34 p.m. OK Java 11 TESTS 6 217 0
195716663 FirstException B March 2, 2023, 6:12 p.m. OK Java 11 TESTS 6 217 40960000
195761967 KeroroGuns0 B March 3, 2023, 5:54 a.m. OK Java 11 TESTS 18 233 0
195732532 IET_LUCKNOW B March 2, 2023, 8:46 p.m. OK Java 11 TESTS 6 265 0
195711224 cfnoob B March 2, 2023, 5:33 p.m. OK Java 11 TESTS 6 265 0
195736113 creativegiant B March 2, 2023, 9:46 p.m. OK Java 11 TESTS 6 280 0
195722644 SmartCode B March 2, 2023, 7 p.m. OK Java 11 TESTS 6 296 0
195723412 sourin_bruh B March 2, 2023, 7:07 p.m. OK Java 17 TESTS 6 202 307200
195755914 less_ordinary B March 3, 2023, 4:41 a.m. OK Java 17 TESTS 18 202 819200
195730414 alm_t B March 2, 2023, 8:19 p.m. OK Java 17 TESTS 6 218 409600
195738376 sarvesh_bawari B March 2, 2023, 10:34 p.m. OK Java 17 TESTS 6 248 38604800
195747995 Kaz0806 B March 3, 2023, 2:22 a.m. OK Java 17 TESTS 18 249 307200
195724648 kumarmonu B March 2, 2023, 7:18 p.m. OK Java 17 TESTS 6 249 614400
195712776 kmanikanta335 B March 2, 2023, 5:44 p.m. OK Java 17 TESTS 6 249 819200
195730055 ahmedtawfik B March 2, 2023, 8:15 p.m. OK Java 17 TESTS 6 264 307200
195761049 goalboy B March 3, 2023, 5:44 a.m. OK Java 17 TESTS 18 280 614400
195718038 Husayn B March 2, 2023, 6:22 p.m. OK Java 17 TESTS 6 295 409600
195721661 Koka B March 2, 2023, 6:52 p.m. OK Java 8 TESTS 6 124 0
195711470 toufique_husein B March 2, 2023, 5:35 p.m. OK Java 8 TESTS 6 156 0
195748988 chuquwan9964 B March 3, 2023, 2:42 a.m. OK Java 8 TESTS 18 171 0
195762888 Saurabh-Sharma B March 3, 2023, 6:04 a.m. OK Java 8 TESTS 18 186 0
195747396 cyclingle B March 3, 2023, 2:08 a.m. OK Java 8 TESTS 18 187 0
195758213 amit_roy B March 3, 2023, 5:09 a.m. OK Java 8 TESTS 18 218 0
195730990 Perfect.Blue B March 2, 2023, 8:26 p.m. OK Java 8 TESTS 6 218 0
195761754 Eunoiay B March 3, 2023, 5:52 a.m. OK Java 8 TESTS 18 233 0
195731419 Perfect.Blue B March 2, 2023, 8:31 p.m. OK Java 8 TESTS 6 233 0
195735624 BleedBlue B March 2, 2023, 9:36 p.m. OK Java 8 TESTS 6 234 0
195715775 Krantzy B March 2, 2023, 6:05 p.m. OK Kotlin 1.7 TESTS 6 624 82124800
195752377 NewPlayer169 B March 3, 2023, 3:42 a.m. OK Kotlin 1.7 TESTS 18 639 52019200
195754333 NguyenVanNgocHuy B March 3, 2023, 4:17 a.m. OK MS C++ 2017 TESTS 18 61 204800
195716434 beksultanomirzak.2001 B March 2, 2023, 6:10 p.m. OK Node.js TESTS 6 264 6758400
195749359 AS23 B March 3, 2023, 2:48 a.m. OK PyPy 3 TESTS 18 327 5529600
195746151 Triumph B March 3, 2023, 1:40 a.m. OK PyPy 3 TESTS 18 343 9011200
195743901 park6 B March 3, 2023, 12:49 a.m. OK PyPy 3 TESTS 18 389 145817600
195734543 cereal-hecker B March 2, 2023, 9:16 p.m. OK PyPy 3 TESTS 6 404 9113600
195722249 Salonig B March 2, 2023, 6:57 p.m. OK PyPy 3 TESTS 6 654 9625600
195748992 InariInDream B March 3, 2023, 2:42 a.m. OK PyPy 3-64 TESTS 18 109 7475200
195714302 ayush_kumar20 B March 2, 2023, 5:55 p.m. OK PyPy 3-64 TESTS 6 124 8601600
195743679 liuaaa B March 3, 2023, 12:44 a.m. OK PyPy 3-64 TESTS 18 124 8908800
195723035 gardengnome B March 2, 2023, 7:03 p.m. OK PyPy 3-64 TESTS 6 139 8908800
195739573 crapcode B March 2, 2023, 11 p.m. OK PyPy 3-64 TESTS 6 140 8704000
195751927 The_MazeRunner B March 3, 2023, 3:34 a.m. OK PyPy 3-64 TESTS 18 140 9011200
195747329 vjudge3 B March 3, 2023, 2:07 a.m. OK PyPy 3-64 TESTS 18 155 9830400
195733818 FlakeLCR B March 2, 2023, 9:05 p.m. OK PyPy 3-64 TESTS 6 155 9932800
195735107 voicon B March 2, 2023, 9:27 p.m. OK PyPy 3-64 TESTS 6 187 9523200
195719237 vedantmishra69 B March 2, 2023, 6:31 p.m. OK PyPy 3-64 TESTS 6 202 9728000
195741801 bkifhr6 B March 2, 2023, 11:58 p.m. OK Python 3 TESTS 6 171 921600
195730428 ktheu42 B March 2, 2023, 8:19 p.m. OK Python 3 TESTS 6 187 307200
195729937 taruarora2605 B March 2, 2023, 8:13 p.m. OK Python 3 TESTS 6 187 614400
195734723 sdarkii B March 2, 2023, 9:20 p.m. OK Python 3 TESTS 6 202 614400
195716780 eugalt B March 2, 2023, 6:13 p.m. OK Python 3 TESTS 6 202 614400
195712087 _AbdElrhman_ B March 2, 2023, 5:39 p.m. OK Python 3 TESTS 6 233 716800
195712074 sreekar7557 B March 2, 2023, 5:39 p.m. OK Python 3 TESTS 6 264 307200
195746283 sasivardhan3952 B March 3, 2023, 1:43 a.m. OK Python 3 TESTS 18 264 716800
195731267 Ksys B March 2, 2023, 8:29 p.m. OK Python 3 TESTS 6 265 307200
195756115 az_1zbek B March 3, 2023, 4:44 a.m. OK Python 3 TESTS 18 265 512000

remove filters

Back to search problems