Codeforces Round 798 (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
1689 Codeforces Round 798 (Div. 2) FINISHED False 7200 82301063 June 10, 2022, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16899 ) A Lex String PROGRAMMING brute force greedy implementation sortings two pointers

B"Kuznecov likes art, poetry, and music. And strings consisting of lowercase English letters. Recently, Kuznecov has found two strings, a and b , of lengths n and m respectively. They consist of lowercase English letters and no character is contained in both strings. Let another string c be initially empty. Kuznecov can do the following two types of operations: But, he can not do more than k operations of the same type in a row. He must perform operations until either a or b becomes empty. What is the lexicographically smallest possible value of c after he finishes? A string x is lexicographically smaller than a string y if and only if one of the following holds: There are several test cases in the input data. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. This is followed by the test cases description. The first line of each test case contains three integers n , m , and k ( 1 <= q n,m,k <= q 100 ) -- parameters from the statement. The second line of each test case contains the string a of length n . The third line of each test case contains the string b of length m . The strings contain only lowercase English letters. It is guaranteed that no symbol appears in a and b simultaneously. In each test case, output a single string c -- the answer to the problem. In the first test case, it is optimal to take two 'a's from the string a and add them to the string c . Then it is forbidden to take more characters from a , hence one character 'b' from the string b has to be taken. Following that logic, we end up with c being 'aabaabaa' when string a is emptied. In the second test case it is optimal to take as many 'a's from string a as possible, then take as many 'b's as possible from string b . In the end, we take two 'c's from the string"...

Tutorials

Editorial for Codeforces Round #798 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
160139651 TheILICH A June 10, 2022, 7:14 p.m. OK C# 8 TESTS 13 77 409600
160141495 TheILICH A June 10, 2022, 7:34 p.m. OK C# 8 TESTS 13 78 614400
160132505 e.ramos A June 10, 2022, 6:26 p.m. OK C# 8 TESTS 13 92 3379200
160140836 TheILICH A June 10, 2022, 7:26 p.m. OK C# 8 TESTS 13 109 409600
160142430 TheILICH A June 10, 2022, 7:45 p.m. OK C# 8 TESTS 13 124 409600
160165652 FO7 A June 11, 2022, 5:56 a.m. OK Clang++17 Diagnostics TESTS 13 46 2048000
160139822 NenadDapic A June 10, 2022, 7:16 p.m. OK FPC TESTS 13 46 102400
160145280 GTrigger A June 10, 2022, 8:33 p.m. OK GNU C11 TESTS 13 15 0
160134184 trassis A June 10, 2022, 6:30 p.m. OK GNU C11 TESTS 13 15 204800
160156335 anantha_lakshmi A June 11, 2022, 3:03 a.m. OK GNU C11 TESTS 13 78 0
160152114 zwh1234 A June 11, 2022, 12:42 a.m. OK GNU C++14 TESTS 13 0 0
160141781 ObaidaNa A June 10, 2022, 7:37 p.m. OK GNU C++14 TESTS 13 0 0
160143635 Saman. A June 10, 2022, 8:03 p.m. OK GNU C++14 TESTS 13 0 102400
160128957 Raj1199 A June 10, 2022, 6:14 p.m. OK GNU C++14 TESTS 13 0 102400
160159811 agarwal.ujjwal.2017099 A June 11, 2022, 4:23 a.m. OK GNU C++14 TESTS 13 0 102400
160144624 Ahsan_Lasa A June 10, 2022, 8:20 p.m. OK GNU C++14 TESTS 13 0 102400
160165932 bb_16 A June 11, 2022, 5:59 a.m. OK GNU C++14 TESTS 13 0 102400
160160087 rabby_061 A June 11, 2022, 4:28 a.m. OK GNU C++14 TESTS 13 0 204800
160153527 A-kash A June 11, 2022, 1:39 a.m. OK GNU C++14 TESTS 13 0 204800
160153425 devesh72 A June 11, 2022, 1:36 a.m. OK GNU C++14 TESTS 13 0 204800
160163519 HalfTree A June 11, 2022, 5:24 a.m. OK GNU C++17 TESTS 13 0 0
160164287 __AhmedSamir__ A June 11, 2022, 5:36 a.m. OK GNU C++17 TESTS 13 0 0
160150174 083_SAGAR A June 10, 2022, 10:59 p.m. OK GNU C++17 TESTS 13 0 0
160150910 sharma_gautam A June 10, 2022, 11:33 p.m. OK GNU C++17 TESTS 13 0 0
160164108 AINgrey A June 11, 2022, 5:34 a.m. OK GNU C++17 TESTS 13 0 0
160163720 HalfTree A June 11, 2022, 5:28 a.m. OK GNU C++17 TESTS 13 0 0
160159228 coderutsav A June 11, 2022, 4:12 a.m. OK GNU C++17 TESTS 13 0 102400
160165855 Creator6113 A June 11, 2022, 5:58 a.m. OK GNU C++17 TESTS 13 0 102400
160162160 Anshuman8800 A June 11, 2022, 5:04 a.m. OK GNU C++17 TESTS 13 0 102400
160156018 Tyagi_G A June 11, 2022, 2:55 a.m. OK GNU C++17 TESTS 13 0 102400
160161158 GudeGude A June 11, 2022, 4:48 a.m. OK GNU C++17 (64) TESTS 13 0 0
160159896 aatrey A June 11, 2022, 4:25 a.m. OK GNU C++17 (64) TESTS 13 0 0
160154918 thu_lecore A June 11, 2022, 2:26 a.m. OK GNU C++17 (64) TESTS 13 0 0
160153949 PCC A June 11, 2022, 1:55 a.m. OK GNU C++17 (64) TESTS 13 0 0
160161153 Richw818 A June 11, 2022, 4:48 a.m. OK GNU C++17 (64) TESTS 13 0 0
160160436 prajjwalsahu5432 A June 11, 2022, 4:35 a.m. OK GNU C++17 (64) TESTS 13 0 0
160160055 Prakhar6969 A June 11, 2022, 4:28 a.m. OK GNU C++17 (64) TESTS 13 0 0
160162005 yaoveil A June 11, 2022, 5:02 a.m. OK GNU C++17 (64) TESTS 13 0 0
160163473 aliasgar_45 A June 11, 2022, 5:24 a.m. OK GNU C++17 (64) TESTS 13 0 0
160165263 OTTFF A June 11, 2022, 5:51 a.m. OK GNU C++17 (64) TESTS 13 0 0
160164445 andif A June 11, 2022, 5:39 a.m. OK GNU C++20 (64) TESTS 13 0 0
160165931 starchaser A June 11, 2022, 5:59 a.m. OK GNU C++20 (64) TESTS 13 0 0
160165834 Kirito8055 A June 11, 2022, 5:58 a.m. OK GNU C++20 (64) TESTS 13 0 0
160165426 ranaadarsh A June 11, 2022, 5:53 a.m. OK GNU C++20 (64) TESTS 13 0 0
160164368 MartinKclark A June 11, 2022, 5:38 a.m. OK GNU C++20 (64) TESTS 13 0 0
160163238 BurnedChicken A June 11, 2022, 5:21 a.m. OK GNU C++20 (64) TESTS 13 0 0
160163141 shaosy A June 11, 2022, 5:20 a.m. OK GNU C++20 (64) TESTS 13 0 0
160162986 asd12 A June 11, 2022, 5:17 a.m. OK GNU C++20 (64) TESTS 13 0 0
160162958 Biswajit_rout A June 11, 2022, 5:17 a.m. OK GNU C++20 (64) TESTS 13 0 0
160162746 dash2199 A June 11, 2022, 5:13 a.m. OK GNU C++20 (64) TESTS 13 0 0
160147046 koqo A June 10, 2022, 9:11 p.m. OK Go TESTS 13 15 204800
160128719 MunirKP A June 10, 2022, 6:13 p.m. OK Java 11 TESTS 13 171 0
160158478 eshan18.09 A June 11, 2022, 3:55 a.m. OK Java 11 TESTS 13 171 0
160155964 aditya2024 A June 11, 2022, 2:54 a.m. OK Java 11 TESTS 13 171 0
160140855 deepakjoshi6102 A June 10, 2022, 7:26 p.m. OK Java 11 TESTS 13 171 0
160152218 unfixedbug A June 11, 2022, 12:46 a.m. OK Java 11 TESTS 13 186 0
160141376 Noobcoder1107 A June 10, 2022, 7:32 p.m. OK Java 11 TESTS 13 187 0
160141670 thusharke_25 A June 10, 2022, 7:36 p.m. OK Java 11 TESTS 13 187 0
160158484 Juhaied_nabid A June 11, 2022, 3:56 a.m. OK Java 11 TESTS 13 202 0
160165236 sf14t A June 11, 2022, 5:50 a.m. OK Java 11 TESTS 13 202 0
160160052 x21svage A June 11, 2022, 4:28 a.m. OK Java 11 TESTS 13 202 0
160157719 z_zhaojun A June 11, 2022, 3:38 a.m. OK Java 8 TESTS 13 93 0
160155520 shivam01_0 A June 11, 2022, 2:43 a.m. OK Java 8 TESTS 13 93 0
160153933 priyaroy3370 A June 11, 2022, 1:55 a.m. OK Java 8 TESTS 13 108 0
160139572 rish1896 A June 10, 2022, 7:14 p.m. OK Java 8 TESTS 13 108 0
160137075 dheerajchhatanidc A June 10, 2022, 6:59 p.m. OK Java 8 TESTS 13 109 0
160161372 KhadijaBadrawy A June 11, 2022, 4:52 a.m. OK Java 8 TESTS 13 109 0
160158997 tanishq044 A June 11, 2022, 4:07 a.m. OK Java 8 TESTS 13 109 0
160158364 ArcadioN A June 11, 2022, 3:53 a.m. OK Java 8 TESTS 13 109 0
160134418 BhargavModha A June 10, 2022, 6:31 p.m. OK Java 8 TESTS 13 109 0
160126128 less_ordinary A June 10, 2022, 6:04 p.m. OK Java 8 TESTS 13 109 0
160148456 SlavaG A June 10, 2022, 9:52 p.m. OK Kotlin 1.6 TESTS 13 202 819200
160127549 mohamedbakr A June 10, 2022, 6:09 p.m. OK Mono C# TESTS 13 62 2969600
160156609 EbisuSA A June 11, 2022, 3:10 a.m. OK MS C++ 2017 TESTS 13 15 0
160143247 1_shivam A June 10, 2022, 7:57 p.m. OK MS C++ 2017 TESTS 13 15 0
160126282 karun_3103 A June 10, 2022, 6:05 p.m. OK MS C++ 2017 TESTS 13 15 0
160158428 XYShaoKang A June 11, 2022, 3:54 a.m. OK Node.js TESTS 13 92 2662400
160135060 ToxicalNoob3062 A June 10, 2022, 6:33 p.m. OK Node.js TESTS 13 93 1740800
160144764 Isfandiyor A June 10, 2022, 8:23 p.m. OK PHP TESTS 13 46 614400
160159379 sagamantus A June 11, 2022, 4:15 a.m. OK PyPy 3 TESTS 13 93 1433600
160140053 NapoleonB A June 10, 2022, 7:18 p.m. OK PyPy 3 TESTS 13 93 1433600
160145117 Mohamed_yousef2024 A June 10, 2022, 8:30 p.m. OK PyPy 3 TESTS 13 93 1536000
160138595 Vishaaal_Singh A June 10, 2022, 7:06 p.m. OK PyPy 3 TESTS 13 93 1843200
160161375 JohnX4321 A June 11, 2022, 4:52 a.m. OK PyPy 3 TESTS 13 108 1843200
160137369 akki_12 A June 10, 2022, 6:59 p.m. OK PyPy 3 TESTS 13 108 1843200
160126669 _Frust A June 10, 2022, 6:06 p.m. OK PyPy 3 TESTS 13 108 1843200
160135961 MegaCharizrdZ A June 10, 2022, 6:34 p.m. OK PyPy 3 TESTS 13 124 3276800
160145358 AyuAnchor A June 10, 2022, 8:34 p.m. OK PyPy 3 TESTS 13 139 2150400
160150435 Bad_day_toCode A June 10, 2022, 11:09 p.m. OK PyPy 3 TESTS 13 139 3072000
160165678 bsheep014 A June 11, 2022, 5:56 a.m. OK PyPy 3-64 TESTS 13 62 2560000
160143116 sumit_chugwani A June 10, 2022, 7:54 p.m. OK PyPy 3-64 TESTS 13 77 2252800
160152480 EDCTY A June 11, 2022, 12:57 a.m. OK PyPy 3-64 TESTS 13 77 2355200
160144758 MistaAsh A June 10, 2022, 8:23 p.m. OK PyPy 3-64 TESTS 13 77 2355200
160142178 AngelAS A June 10, 2022, 7:42 p.m. OK PyPy 3-64 TESTS 13 77 2457600
160138730 SophieHatter A June 10, 2022, 7:07 p.m. OK PyPy 3-64 TESTS 13 77 2457600
160163034 shreshth1802 A June 11, 2022, 5:18 a.m. OK PyPy 3-64 TESTS 13 77 2560000
160157983 sp_Piyush A June 11, 2022, 3:45 a.m. OK PyPy 3-64 TESTS 13 77 2560000
160154313 Wooly18 A June 11, 2022, 2:08 a.m. OK PyPy 3-64 TESTS 13 77 2560000
160154117 Youarenotgood A June 11, 2022, 2:01 a.m. OK PyPy 3-64 TESTS 13 77 2560000
160163908 pennymagic156 A June 11, 2022, 5:31 a.m. OK Python 3 TESTS 13 46 0
160160334 Hoyt A June 11, 2022, 4:33 a.m. OK Python 3 TESTS 13 46 0
160159932 Hoyt A June 11, 2022, 4:26 a.m. OK Python 3 TESTS 13 46 0
160149179 h1376h A June 10, 2022, 10:16 p.m. OK Python 3 TESTS 13 46 0
160149050 h1376h A June 10, 2022, 10:12 p.m. OK Python 3 TESTS 13 46 0
160144769 bisentanmay A June 10, 2022, 8:23 p.m. OK Python 3 TESTS 13 46 0
160138806 V.S.R A June 10, 2022, 7:07 p.m. OK Python 3 TESTS 13 46 0
160133384 aonr A June 10, 2022, 6:28 p.m. OK Python 3 TESTS 13 46 0
160132007 panchalsachin260 A June 10, 2022, 6:24 p.m. OK Python 3 TESTS 13 46 0
160131189 Srugun A June 10, 2022, 6:21 p.m. OK Python 3 TESTS 13 46 0

remove filters

Back to search problems