Codeforces Round 921 (Div. 1)

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
1924 Codeforces Round 921 (Div. 1) FINISHED False 7200 30813263 Jan. 27, 2024, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14482 ) A Did We Get Everything Covered? PROGRAMMING constructive algorithms dp greedy strings

B'You are given two integers n and k along with a string s . Your task is to check whether all possible strings of length n that can be formed using the first k lowercase English alphabets occur as a subsequence of s . If the answer is NO, you also need to print a string of length n that can be formed using the first k lowercase English alphabets which does not occur as a subsequence of s . If there are multiple answers, you may print any of them. Note: A string a is called a subsequence of another string b if a can be obtained by deleting some (possibly zero) characters from b without changing the order of the remaining characters. The first line of input contains a single integer t , (1 <= t <= 10^5) , the number of test cases. The first line of each test case contains 3 integers n , (1 <= n <= 26), : k , (1 <= k <= 26), : m , (1 <= m <= 1000) , where n and k are the same as described in the input and m is the length of the string s . The second line of each test case contains a single string s of length m , comprising only of the first k lowercase English alphabets. It is guaranteed that the sum of m and the sum of n over all test cases does not exceed 10^6 . For each test case, print YES if all possible strings of length n that can be formed using the first k lowercase English alphabets occur as a subsequence of s , else print NO. If your answer is NO, print a string of length n that can be formed using the first k lowercase English alphabets which does not occur as a subsequence of s in the next line. You may print each letter of YES or NO in any case (for example, YES, yES, YeS will all be recognized as a positive answer). For the first test case, all possible strings (aa, ab, ba, bb) of length 2 that can be formed using the first 2 English alphab'...

Tutorials

Codeforces Round 921 (Div. 1, Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
243585334 mban259 A Jan. 27, 2024, 3:08 p.m. OK C# 10 TESTS 12 109 6348800
243693060 Adeer_Bakht A Jan. 28, 2024, 1:03 a.m. OK Clang++17 Diagnostics TESTS 12 1294 5222400
243566424 Gassa A Jan. 27, 2024, 2:54 p.m. OK D TESTS 12 218 2150400
243580940 chro4896 A Jan. 27, 2024, 3:05 p.m. OK GNU C11 TESTS 12 904 307200
243560857 alireza_kaviani A Jan. 27, 2024, 2:51 p.m. OK GNU C++17 TESTS 12 61 0
243559787 potato167 A Jan. 27, 2024, 2:50 p.m. OK GNU C++17 TESTS 12 62 307200
243566159 CodeFurces A Jan. 27, 2024, 2:54 p.m. OK GNU C++17 TESTS 12 77 0
243583521 Hata_no_Kokoro A Jan. 27, 2024, 3:07 p.m. OK GNU C++17 TESTS 12 77 102400
243585906 pizzaroot A Jan. 27, 2024, 3:09 p.m. OK GNU C++17 TESTS 12 77 204800
243575640 Guslix A Jan. 27, 2024, 3:01 p.m. OK GNU C++17 TESTS 12 77 204800
243560976 lotusblume A Jan. 27, 2024, 2:51 p.m. OK GNU C++17 TESTS 12 77 204800
243586077 Andyvanh1 A Jan. 27, 2024, 3:09 p.m. OK GNU C++17 TESTS 12 77 204800
243573442 dancho A Jan. 27, 2024, 2:59 p.m. OK GNU C++17 TESTS 12 78 0
243587127 dorulean A Jan. 27, 2024, 3:10 p.m. OK GNU C++17 TESTS 12 78 204800
243691746 Max_s_xaM A Jan. 28, 2024, 12:24 a.m. OK GNU C++17 (64) TESTS 12 31 2150400
243599403 gqf123 A Jan. 27, 2024, 3:22 p.m. OK GNU C++17 (64) TESTS 12 46 0
243691813 wzc_IOI_czw A Jan. 28, 2024, 12:25 a.m. OK GNU C++17 (64) TESTS 12 46 1024000
243590989 ImmortaLimit A Jan. 27, 2024, 3:13 p.m. OK GNU C++17 (64) TESTS 12 46 30822400
243564748 katzper01 A Jan. 27, 2024, 2:53 p.m. OK GNU C++17 (64) TESTS 12 61 204800
243597594 MCYang A Jan. 27, 2024, 3:20 p.m. OK GNU C++17 (64) TESTS 12 62 0
243695586 orzdevinwang A Jan. 28, 2024, 1:57 a.m. OK GNU C++17 (64) TESTS 12 62 0
243690651 User-Unauthorized A Jan. 27, 2024, 11:53 p.m. OK GNU C++17 (64) TESTS 12 62 102400
243565583 Hyperbolic A Jan. 27, 2024, 2:54 p.m. OK GNU C++17 (64) TESTS 12 62 512000
243703918 233zhang A Jan. 28, 2024, 4:02 a.m. OK GNU C++17 (64) TESTS 12 77 0
243559700 maspy A Jan. 27, 2024, 2:50 p.m. OK GNU C++20 (64) TESTS 12 30 204800
243711703 prairie2022 A Jan. 28, 2024, 5:37 a.m. OK GNU C++20 (64) TESTS 12 31 0
243591497 FredBill A Jan. 27, 2024, 3:14 p.m. OK GNU C++20 (64) TESTS 12 31 2048000
243570014 Legitimity A Jan. 27, 2024, 2:57 p.m. OK GNU C++20 (64) TESTS 12 31 2150400
243562853 Sulfox A Jan. 27, 2024, 2:52 p.m. OK GNU C++20 (64) TESTS 12 31 3276800
243599107 User0069 A Jan. 27, 2024, 3:21 p.m. OK GNU C++20 (64) TESTS 12 46 0
243710972 DogAndCat A Jan. 28, 2024, 5:30 a.m. OK GNU C++20 (64) TESTS 12 46 0
243691168 SKnight4 A Jan. 28, 2024, 12:08 a.m. OK GNU C++20 (64) TESTS 12 46 0
243586029 Teddiursa A Jan. 27, 2024, 3:09 p.m. OK GNU C++20 (64) TESTS 12 46 0
243585555 Angus_Yeung A Jan. 27, 2024, 3:08 p.m. OK GNU C++20 (64) TESTS 12 46 0
243568537 profchi A Jan. 27, 2024, 2:56 p.m. OK Java 21 TESTS 12 389 0
243573579 MagentaCobra A Jan. 27, 2024, 2:59 p.m. OK Java 8 TESTS 12 124 0
243695893 thedesalizes A Jan. 28, 2024, 2:02 a.m. OK Java 8 TESTS 12 202 0
243568248 SecondThread A Jan. 27, 2024, 2:55 p.m. OK Java 8 TESTS 12 217 38400000
243565685 taran_1407 A Jan. 27, 2024, 2:54 p.m. OK Java 8 TESTS 12 249 0
243580610 golions A Jan. 27, 2024, 3:04 p.m. OK Java 8 TESTS 12 280 0
243651162 Tlatoani A Jan. 27, 2024, 4:36 p.m. OK Kotlin 1.9 TESTS 12 280 0
243569367 FastFreeTask A Jan. 27, 2024, 2:56 p.m. OK Kotlin 1.9 TESTS 12 296 1433600
243579094 bcollet A Jan. 27, 2024, 3:03 p.m. OK PyPy 2 TESTS 12 389 14028800
243565852 misorin A Jan. 27, 2024, 2:54 p.m. OK PyPy 3 TESTS 12 326 14848000
243576763 newbrn A Jan. 27, 2024, 3:01 p.m. OK PyPy 3 TESTS 12 514 11878400
243574191 tamato A Jan. 27, 2024, 2:59 p.m. OK PyPy 3-64 TESTS 12 358 11366400
243575543 plevande A Jan. 27, 2024, 3 p.m. OK PyPy 3-64 TESTS 12 358 11878400
243668456 oweijane A Jan. 27, 2024, 7:04 p.m. OK PyPy 3-64 TESTS 12 358 12697600
243585251 titia A Jan. 27, 2024, 3:08 p.m. OK PyPy 3-64 TESTS 12 374 12185600
243567753 Maruzensky A Jan. 27, 2024, 2:55 p.m. OK PyPy 3-64 TESTS 12 390 11161600
243589517 byurak A Jan. 27, 2024, 3:12 p.m. OK PyPy 3-64 TESTS 12 405 11571200
243707515 Little_Sheep_Yawn A Jan. 28, 2024, 4:51 a.m. OK PyPy 3-64 TESTS 12 436 13312000
243594447 hxu10 A Jan. 27, 2024, 3:17 p.m. OK PyPy 3-64 TESTS 12 451 11878400
243603391 mymelochan A Jan. 27, 2024, 3:26 p.m. OK PyPy 3-64 TESTS 12 452 11571200
243567657 alxwen711 A Jan. 27, 2024, 2:55 p.m. OK PyPy 3-64 TESTS 12 467 12902400
243569317 Jimanbanashi A Jan. 27, 2024, 2:56 p.m. OK Python 2 TESTS 12 561 102400
243581602 minhnguyen13082003 A Jan. 27, 2024, 3:05 p.m. OK Python 3 TESTS 12 1184 2867200
243562934 sansen A Jan. 27, 2024, 2:52 p.m. OK Rust 2021 TESTS 12 61 10137600
243581159 andrey.m A Jan. 27, 2024, 3:05 p.m. OK Rust 2021 TESTS 12 93 512000
243584885 haihamabossu A Jan. 27, 2024, 3:08 p.m. OK Rust 2021 TESTS 12 218 1945600

remove filters

Back to search problems