Codeforces Round 809 (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
1706 Codeforces Round 809 (Div. 2) FINISHED False 7200 79111463 July 18, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 23160 ) A Another String Minimization Problem PROGRAMMING greedy strings

B'You have a sequence a_1, a_2, ldots, a_n of length n , consisting of integers between 1 and m . You also have a string s , consisting of m characters B. You are going to perform the following n operations. Find the lexicographically smallest string you can get after these operations. A string x is lexicographically smaller than a string y of the same length if and only if in the first position where x and y differ, the string x has a letter that appears earlier in the alphabet than the corresponding letter in y . The first line contains the number of test cases t ( 1 <= t <= 2000 ). The first line of each test case contains two integers n and m ( 1 <= n, m <= 50 ) -- the length of the sequence a and the length of the string s respectively. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= m ) -- the sequence a . For each test case, print a string of length m -- the lexicographically smallest string you can get. Each character of the string should be either capital English letter A or capital English letter B. In the first test case, the sequence a = [1, 1, 3, 1] . One of the possible solutions is the following. In the second test case, you are going to perform only one operation. You can replace either the 2 -nd character or 4 -th character of s with A. You can get strings BABBB and BBBAB after the operation. The string BABBB is the lexicographically smallest among these strings. In the third test case, the only string you can get is A. In the fourth test case, you can replace the 1 -st and 2 -nd characters of s with A to get AABB. In the fifth test case, you can replace the 1 -st and 3 -rd characters of s with A to get ABABBBB. '...

Tutorials

Codeforces Round #809 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
164802628 mban259 A July 18, 2022, 5:58 p.m. OK C# 10 TESTS 15 62 3174400
164806429 DumbCow A July 18, 2022, 6:33 p.m. OK C# 10 TESTS 15 62 3584000
164798818 yousuf19 A July 18, 2022, 5:30 p.m. OK C# 10 TESTS 15 77 3481600
164818640 ProgrammerD A July 18, 2022, 8:57 p.m. OK C# 10 TESTS 15 77 3686400
164793108 shad_kidwai A July 18, 2022, 4:33 p.m. OK C# 8 TESTS 15 139 3686400
164842393 Paras0707Alt A July 19, 2022, 3:48 a.m. OK Clang++17 Diagnostics TESTS 15 358 7372800
164841116 SP2003 A July 19, 2022, 3:31 a.m. OK GNU C11 TESTS 15 46 0
164844880 chenly8128 A July 19, 2022, 4:26 a.m. OK GNU C11 TESTS 15 46 0
164848174 rizwanul210058 A July 19, 2022, 5:17 a.m. OK GNU C11 TESTS 15 405 0
164798254 tonmoy00saha A July 18, 2022, 5:28 p.m. OK GNU C11 TESTS 15 420 0
164789057 Sarna_Das A July 18, 2022, 4:24 p.m. OK GNU C11 TESTS 15 421 0
164846382 8178541919 A July 19, 2022, 4:50 a.m. OK GNU C++14 TESTS 15 15 0
164815836 Ecrade_ A July 18, 2022, 8:18 p.m. OK GNU C++14 TESTS 15 15 0
164805089 durjoy122 A July 18, 2022, 6:20 p.m. OK GNU C++14 TESTS 15 15 204800
164836841 Little_Leaf A July 19, 2022, 2:36 a.m. OK GNU C++14 TESTS 15 15 8396800
164826473 OIerGegu1019 A July 18, 2022, 11:43 p.m. OK GNU C++14 TESTS 15 30 0
164800016 Ruki.cf A July 18, 2022, 5:38 p.m. OK GNU C++14 TESTS 15 30 0
164842914 MMSM A July 19, 2022, 3:56 a.m. OK GNU C++14 TESTS 15 30 0
164846518 MohamedMamdouh19 A July 19, 2022, 4:53 a.m. OK GNU C++14 TESTS 15 30 102400
164810192 yunic710 A July 18, 2022, 7:14 p.m. OK GNU C++14 TESTS 15 30 102400
164820617 kanstantin A July 18, 2022, 9:30 p.m. OK GNU C++14 TESTS 15 30 204800
164801040 Hemantj A July 18, 2022, 5:45 p.m. OK GNU C++17 TESTS 15 15 0
164800352 Singhhemant10 A July 18, 2022, 5:40 p.m. OK GNU C++17 TESTS 15 15 0
164818723 tanishka157 A July 18, 2022, 8:58 p.m. OK GNU C++17 TESTS 15 15 0
164799766 vedangc03 A July 18, 2022, 5:36 p.m. OK GNU C++17 TESTS 15 15 204800
164787875 __thehalfbloodprince A July 18, 2022, 4:21 p.m. OK GNU C++17 TESTS 15 15 204800
164809669 orz_max A July 18, 2022, 7:09 p.m. OK GNU C++17 TESTS 15 15 204800
164800098 Ruki A July 18, 2022, 5:38 p.m. OK GNU C++17 TESTS 15 30 0
164802045 RIPA__ A July 18, 2022, 5:53 p.m. OK GNU C++17 TESTS 15 30 0
164825726 raspi A July 18, 2022, 11:23 p.m. OK GNU C++17 TESTS 15 30 0
164827793 Marshall-Anas A July 19, 2022, 12:19 a.m. OK GNU C++17 TESTS 15 30 102400
164843829 nit_ay03 A July 19, 2022, 4:09 a.m. OK GNU C++17 (64) TESTS 15 15 0
164847924 failure._M0nK A July 19, 2022, 5:13 a.m. OK GNU C++17 (64) TESTS 15 15 0
164846964 Dijkstra_attack A July 19, 2022, 4:59 a.m. OK GNU C++17 (64) TESTS 15 15 0
164844334 Koo_ A July 19, 2022, 4:17 a.m. OK GNU C++17 (64) TESTS 15 15 0
164842216 XHYU61 A July 19, 2022, 3:46 a.m. OK GNU C++17 (64) TESTS 15 15 0
164838315 LeeJiaHua A July 19, 2022, 2:55 a.m. OK GNU C++17 (64) TESTS 15 15 0
164830744 Muly A July 19, 2022, 1:15 a.m. OK GNU C++17 (64) TESTS 15 15 0
164829143 MSab6ir A July 19, 2022, 12:48 a.m. OK GNU C++17 (64) TESTS 15 15 0
164828933 shengdao666 A July 19, 2022, 12:44 a.m. OK GNU C++17 (64) TESTS 15 15 0
164824314 adventure A July 18, 2022, 10:47 p.m. OK GNU C++17 (64) TESTS 15 15 0
164843955 NadmanKhan A July 19, 2022, 4:11 a.m. OK GNU C++20 (64) TESTS 15 15 0
164843920 Rinors A July 19, 2022, 4:11 a.m. OK GNU C++20 (64) TESTS 15 15 0
164843754 Asem25xr A July 19, 2022, 4:08 a.m. OK GNU C++20 (64) TESTS 15 15 0
164843395 ReiVindicatio A July 19, 2022, 4:03 a.m. OK GNU C++20 (64) TESTS 15 15 0
164839300 yangster67 A July 19, 2022, 3:08 a.m. OK GNU C++20 (64) TESTS 15 15 0
164845925 agrawalpiyush A July 19, 2022, 4:43 a.m. OK GNU C++20 (64) TESTS 15 15 0
164846523 striker__79 A July 19, 2022, 4:53 a.m. OK GNU C++20 (64) TESTS 15 15 0
164846626 s_jaskaran_s A July 19, 2022, 4:54 a.m. OK GNU C++20 (64) TESTS 15 15 0
164849443 SGColin A July 19, 2022, 5:34 a.m. OK GNU C++20 (64) TESTS 15 15 0
164850978 vansh_madbomb A July 19, 2022, 5:53 a.m. OK GNU C++20 (64) TESTS 15 15 0
164826385 pili A July 18, 2022, 11:40 p.m. OK Go TESTS 15 31 2355200
164813229 shiro A July 18, 2022, 7:47 p.m. OK Go TESTS 15 46 512000
164820980 glebsamsonov A July 18, 2022, 9:37 p.m. OK Go TESTS 15 61 1024000
164848633 KarMa_ A July 19, 2022, 5:23 a.m. OK Java 11 TESTS 15 171 0
164846340 __Serendipity A July 19, 2022, 4:50 a.m. OK Java 11 TESTS 15 171 0
164840588 vijender_8601 A July 19, 2022, 3:24 a.m. OK Java 11 TESTS 15 171 0
164840327 KarMa_ A July 19, 2022, 3:20 a.m. OK Java 11 TESTS 15 187 0
164809309 adi_7861 A July 18, 2022, 7:04 p.m. OK Java 11 TESTS 15 187 0
164849466 souvik2000 A July 19, 2022, 5:34 a.m. OK Java 11 TESTS 15 202 0
164840886 mritunjayy A July 19, 2022, 3:28 a.m. OK Java 11 TESTS 15 202 0
164826026 gk_cool A July 18, 2022, 11:30 p.m. OK Java 11 TESTS 15 202 0
164801476 Deepak4466 A July 18, 2022, 5:49 p.m. OK Java 11 TESTS 15 202 0
164798666 g_square A July 18, 2022, 5:30 p.m. OK Java 11 TESTS 15 202 0
164829763 jlalba A July 19, 2022, 1 a.m. OK Java 17 TESTS 15 248 409600
164812757 Ali04 A July 18, 2022, 7:41 p.m. OK Java 17 TESTS 15 280 204800
164840386 goalboy A July 19, 2022, 3:21 a.m. OK Java 17 TESTS 15 311 716800
164824424 Sussykin A July 18, 2022, 10:50 p.m. OK Java 8 TESTS 15 108 0
164818164 AhmedEl-Gohary A July 18, 2022, 8:50 p.m. OK Java 8 TESTS 15 108 0
164842376 _snowballsenpai A July 19, 2022, 3:48 a.m. OK Java 8 TESTS 15 109 0
164798165 Mohamed308 A July 18, 2022, 5:27 p.m. OK Java 8 TESTS 15 109 0
164844526 andar_se_toot_chuka_hu A July 19, 2022, 4:20 a.m. OK Java 8 TESTS 15 124 0
164811922 kkkkush A July 18, 2022, 7:33 p.m. OK Java 8 TESTS 15 124 0
164803002 less_ordinary A July 18, 2022, 6:02 p.m. OK Java 8 TESTS 15 124 0
164798318 BhargavModha A July 18, 2022, 5:28 p.m. OK Java 8 TESTS 15 124 0
164841469 Do_not_Look_Back A July 19, 2022, 3:36 a.m. OK Java 8 TESTS 15 140 0
164802645 maneeshnarayan1 A July 18, 2022, 5:58 p.m. OK Java 8 TESTS 15 140 0
164806524 soumyadeep_69 A July 18, 2022, 6:34 p.m. OK JavaScript TESTS 15 93 1638400
164824739 junehop A July 18, 2022, 10:57 p.m. OK JavaScript TESTS 15 93 2560000
164813319 PavelChadnov A July 18, 2022, 7:48 p.m. OK Kotlin 1.4 TESTS 15 170 1126400
164835232 i_ama_Marcos A July 19, 2022, 2:17 a.m. OK Kotlin 1.4 TESTS 15 170 1945600
164842242 Tan2K A July 19, 2022, 3:46 a.m. OK MS C++ 2017 TESTS 15 46 0
164832664 M_zhi A July 19, 2022, 1:42 a.m. OK MS C++ 2017 TESTS 15 62 0
164789304 www.yosefsaad4102002 A July 18, 2022, 4:25 p.m. OK MS C++ 2017 TESTS 15 77 0
164837428 1_shivam A July 19, 2022, 2:44 a.m. OK MS C++ 2017 TESTS 15 78 0
164791745 engineer.at20 A July 18, 2022, 4:30 p.m. OK MS C++ 2017 TESTS 15 78 0
164844740 Khaiii A July 19, 2022, 4:24 a.m. OK MS C++ 2017 TESTS 15 78 4096000
164799499 ebashunacplusplus A July 18, 2022, 5:34 p.m. OK MS C++ 2017 TESTS 15 93 204800
164836688 daozhang A July 19, 2022, 2:34 a.m. OK MS C++ 2017 TESTS 15 93 7987200
164791512 CommonMan22 A July 18, 2022, 4:30 p.m. OK MS C++ 2017 TESTS 15 109 0
164834713 XYShaoKang A July 19, 2022, 2:10 a.m. OK Node.js TESTS 15 92 5632000
164825253 zxcuser2 A July 18, 2022, 11:10 p.m. OK PyPy 3 TESTS 15 155 5222400
164804769 abrma A July 18, 2022, 6:17 p.m. OK PyPy 3 TESTS 15 218 6144000
164850336 shriom533 A July 19, 2022, 5:45 a.m. OK PyPy 3 TESTS 15 218 6758400
164823871 Believer_Ayush A July 18, 2022, 10:36 p.m. OK PyPy 3 TESTS 15 233 7577600
164833862 odinluca A July 19, 2022, 1:58 a.m. OK PyPy 3 TESTS 15 234 6758400
164809174 raushnn A July 18, 2022, 7:03 p.m. OK PyPy 3 TESTS 15 234 6860800
164801357 Bishwanath A July 18, 2022, 5:48 p.m. OK PyPy 3 TESTS 15 249 7372800
164808379 gotcoding124 A July 18, 2022, 6:53 p.m. OK PyPy 3 TESTS 15 264 8601600
164803982 mayank35 A July 18, 2022, 6:10 p.m. OK PyPy 3-64 TESTS 15 93 5222400
164806597 Varad2002 A July 18, 2022, 6:34 p.m. OK PyPy 3-64 TESTS 15 93 5427200
164822248 biglunchdude A July 18, 2022, 10:01 p.m. OK PyPy 3-64 TESTS 15 93 6144000
164833636 Youarenotgood A July 19, 2022, 1:55 a.m. OK PyPy 3-64 TESTS 15 109 5836800
164797606 ASawe2.6Main A July 18, 2022, 5:25 p.m. OK PyPy 3-64 TESTS 15 109 6041600
164850064 piSquared A July 19, 2022, 5:42 a.m. OK PyPy 3-64 TESTS 15 109 9216000
164822749 dbstkdals1019 A July 18, 2022, 10:11 p.m. OK PyPy 3-64 TESTS 15 124 5939200
164830849 husnain A July 19, 2022, 1:17 a.m. OK PyPy 3-64 TESTS 15 124 7270400
164804733 sumit_athani A July 18, 2022, 6:17 p.m. OK PyPy 3-64 TESTS 15 124 9318400
164803191 Rikudo_6 A July 18, 2022, 6:03 p.m. OK PyPy 3-64 TESTS 15 155 9420800
164836810 ankit_xyz A July 19, 2022, 2:36 a.m. OK Python 3 TESTS 15 108 0
164850196 zero_2706 A July 19, 2022, 5:43 a.m. OK Python 3 TESTS 15 124 0
164841140 priyankapaleti1220 A July 19, 2022, 3:31 a.m. OK Python 3 TESTS 15 124 0
164839894 AndrescuIII A July 19, 2022, 3:15 a.m. OK Python 3 TESTS 15 124 0
164838136 Arunava_392 A July 19, 2022, 2:52 a.m. OK Python 3 TESTS 15 124 0
164810751 paxaq A July 18, 2022, 7:21 p.m. OK Python 3 TESTS 15 124 0
164809413 E777slam A July 18, 2022, 7:06 p.m. OK Python 3 TESTS 15 124 0
164791870 m1sha.osipov A July 18, 2022, 4:30 p.m. OK Python 3 TESTS 15 124 0
164791500 Priyadarsahn A July 18, 2022, 4:30 p.m. OK Python 3 TESTS 15 124 0
164836200 prathamnagaria A July 19, 2022, 2:29 a.m. OK Python 3 TESTS 15 140 0

remove filters

Back to search problems