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

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 29369 ) A We Got Everything Covered! PROGRAMMING constructive algorithms greedy strings

B'You are given two positive integers n and k . Your task is to find a string s such that all possible strings of length n that can be formed using the first k lowercase English alphabets occur as a subsequence of s . If there are multiple answers, print the one with the smallest length. If there are still 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 <= q t <= q 676 ) denoting the number of test cases. Each test case consists of a single line of input containing two integers n ( 1 <= q n <= q 26 ) and k ( 1 <= q k <= q 26 ). For each test case, print a single line containing a single string s which satisfies the above property. If there are multiple answers, print the one with the smallest length. If there are still multiple answers, you may print any of them. For the first test case, there are two strings of length 1 which can be formed using the first 2 lowercase English alphabets, and they are present in s as a subsequence as follows: For the second test case, there is only one string of length 2 which can be formed using the first lowercase English alphabet, and it is present in s as a subsequence as follows: For the third test case, there are 4 strings of length 2 which can be formed using the first 2 lowercase English alphabets, and they are present in s as a subsequence as follows: For the fourth test case, there are 9 strings of length 2 which can be formed using the first 3 lowercase English alphabets, and they are present in s as a subsequence as follows: '...

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
243686083 kokora A Jan. 27, 2024, 10:10 p.m. OK C# 10 TESTS 6 77 3276800
243684003 kokora A Jan. 27, 2024, 9:35 p.m. OK C# 10 TESTS 6 77 3481600
243675501 Nishant2301AI38 A Jan. 27, 2024, 7:59 p.m. OK Clang++17 Diagnostics TESTS 6 202 0
243676901 pallavshrm27 A Jan. 27, 2024, 8:12 p.m. OK Clang++20 Diagnostics TESTS 6 31 0
243678042 San7-01 A Jan. 27, 2024, 8:23 p.m. OK Clang++20 Diagnostics TESTS 6 46 7372800
243671888 Shrujai A Jan. 27, 2024, 7:30 p.m. OK Clang++20 Diagnostics TESTS 6 46 7372800
243675672 harshprajapati460 A Jan. 27, 2024, 8 p.m. OK Clang++20 Diagnostics TESTS 6 77 3174400
243699292 Sindhu--1612 A Jan. 28, 2024, 2:57 a.m. OK Clang++20 Diagnostics TESTS 6 139 0
243711996 souravsaha2070 A Jan. 28, 2024, 5:40 a.m. OK Clang++20 Diagnostics TESTS 6 156 0
243712240 souravsaha2070 A Jan. 28, 2024, 5:43 a.m. OK Clang++20 Diagnostics TESTS 6 171 0
243671183 stesky A Jan. 27, 2024, 7:25 p.m. OK GNU C11 TESTS 6 15 307200
243677582 uchiha_itachi_1308 A Jan. 27, 2024, 8:19 p.m. OK GNU C11 TESTS 6 31 0
243667744 gana_bhata A Jan. 27, 2024, 6:59 p.m. OK GNU C11 TESTS 6 31 716800
243667271 Maisha106 A Jan. 27, 2024, 6:56 p.m. OK GNU C11 TESTS 6 46 0
243711436 Kavi43252003274489856000 A Jan. 28, 2024, 5:35 a.m. OK GNU C11 TESTS 6 46 716800
243702175 qsxzse A Jan. 28, 2024, 3:38 a.m. OK GNU C11 TESTS 6 46 1228800
243678368 uchiha_itachi_1308 A Jan. 27, 2024, 8:27 p.m. OK GNU C11 TESTS 6 61 307200
243689884 The_God_Father A Jan. 27, 2024, 11:33 p.m. OK GNU C11 TESTS 6 78 307200
243677901 jimmy2683 A Jan. 27, 2024, 8:22 p.m. OK GNU C11 TESTS 6 93 0
243694720 rishabh_sankla A Jan. 28, 2024, 1:40 a.m. OK GNU C11 TESTS 6 93 102400
243664972 Md._Nahid_Ullah_Joy A Jan. 27, 2024, 6:44 p.m. OK GNU C++17 TESTS 6 0 0
243666125 Maher_Atef_74 A Jan. 27, 2024, 6:50 p.m. OK GNU C++17 TESTS 6 0 0
243666647 jaideep01 A Jan. 27, 2024, 6:53 p.m. OK GNU C++17 TESTS 6 0 0
243692135 Intersections A Jan. 28, 2024, 12:36 a.m. OK GNU C++17 TESTS 6 0 0
243699344 rahulkrt A Jan. 28, 2024, 2:58 a.m. OK GNU C++17 TESTS 6 0 1638400
243714137 ritik108 A Jan. 28, 2024, 6:01 a.m. OK GNU C++17 TESTS 6 15 0
243714148 Sid_Roy A Jan. 28, 2024, 6:01 a.m. OK GNU C++17 TESTS 6 15 0
243714230 ammarrahmad A Jan. 28, 2024, 6:02 a.m. OK GNU C++17 TESTS 6 15 0
243713981 _samit_ A Jan. 28, 2024, 5:59 a.m. OK GNU C++17 TESTS 6 15 0
243713933 Scorteen A Jan. 28, 2024, 5:59 a.m. OK GNU C++17 TESTS 6 15 0
243705323 huangkai2005 A Jan. 28, 2024, 4:22 a.m. OK GNU C++17 (64) TESTS 6 0 0
243699789 changemaker A Jan. 28, 2024, 3:06 a.m. OK GNU C++17 (64) TESTS 6 0 0
243711899 xinxinbobo A Jan. 28, 2024, 5:39 a.m. OK GNU C++17 (64) TESTS 6 0 0
243705749 vlokesh08 A Jan. 28, 2024, 4:28 a.m. OK GNU C++17 (64) TESTS 6 0 0
243694575 alone_pig A Jan. 28, 2024, 1:37 a.m. OK GNU C++17 (64) TESTS 6 0 0
243697474 radhekrishna24 A Jan. 28, 2024, 2:28 a.m. OK GNU C++17 (64) TESTS 6 0 0
243714204 alokkumar97 A Jan. 28, 2024, 6:01 a.m. OK GNU C++17 (64) TESTS 6 15 0
243713961 khmndr A Jan. 28, 2024, 5:59 a.m. OK GNU C++17 (64) TESTS 6 15 0
243713403 wuuuuu A Jan. 28, 2024, 5:54 a.m. OK GNU C++17 (64) TESTS 6 15 0
243713242 LFY- A Jan. 28, 2024, 5:53 a.m. OK GNU C++17 (64) TESTS 6 15 0
243711839 visheshgautam.official A Jan. 28, 2024, 5:39 a.m. OK GNU C++20 (64) TESTS 6 0 0
243714162 V_I_P A Jan. 28, 2024, 6:01 a.m. OK GNU C++20 (64) TESTS 6 0 0
243713868 ninjashoyo2395 A Jan. 28, 2024, 5:58 a.m. OK GNU C++20 (64) TESTS 6 0 0
243713852 Ryouko_miku A Jan. 28, 2024, 5:58 a.m. OK GNU C++20 (64) TESTS 6 0 0
243712865 shirayuki_hana A Jan. 28, 2024, 5:49 a.m. OK GNU C++20 (64) TESTS 6 0 0
243712518 reddishMango A Jan. 28, 2024, 5:46 a.m. OK GNU C++20 (64) TESTS 6 0 0
243711749 rishuXX A Jan. 28, 2024, 5:38 a.m. OK GNU C++20 (64) TESTS 6 0 0
243711732 Md_Adil A Jan. 28, 2024, 5:38 a.m. OK GNU C++20 (64) TESTS 6 0 0
243711311 Piyushiitd A Jan. 28, 2024, 5:33 a.m. OK GNU C++20 (64) TESTS 6 0 0
243710781 Before_Sunset A Jan. 28, 2024, 5:28 a.m. OK GNU C++20 (64) TESTS 6 0 0
243666120 botayhard A Jan. 27, 2024, 6:50 p.m. OK Go TESTS 6 15 4403200
243675691 D9RS A Jan. 27, 2024, 8 p.m. OK Go TESTS 6 46 921600
243668243 codeWithDarshan A Jan. 27, 2024, 7:02 p.m. OK Java 21 TESTS 6 218 204800
243697726 Pratik_M07 A Jan. 28, 2024, 2:32 a.m. OK Java 21 TESTS 6 233 102400
243673782 susvant A Jan. 27, 2024, 7:44 p.m. OK Java 21 TESTS 6 233 204800
243702691 priyaroy3370 A Jan. 28, 2024, 3:45 a.m. OK Java 21 TESTS 6 234 0
243710734 Jagnath_Reddy A Jan. 28, 2024, 5:28 a.m. OK Java 21 TESTS 6 264 0
243708750 fabiowg A Jan. 28, 2024, 5:06 a.m. OK Java 21 TESTS 6 265 307200
243666857 Nagendravarma A Jan. 27, 2024, 6:54 p.m. OK Java 21 TESTS 6 280 0
243695798 Hang_We_Hong A Jan. 28, 2024, 2 a.m. OK Java 21 TESTS 6 280 102400
243667536 unk_07 A Jan. 27, 2024, 6:57 p.m. OK Java 21 TESTS 6 280 409600
243666534 Shruti12 A Jan. 27, 2024, 6:52 p.m. OK Java 21 TESTS 6 295 0
243711989 nis1234 A Jan. 28, 2024, 5:40 a.m. OK Java 8 TESTS 6 93 0
243708827 Mr.Numerator_007 A Jan. 28, 2024, 5:07 a.m. OK Java 8 TESTS 6 93 0
243699179 Gavind A Jan. 28, 2024, 2:55 a.m. OK Java 8 TESTS 6 108 0
243669355 Sumitsingh7 A Jan. 27, 2024, 7:11 p.m. OK Java 8 TESTS 6 109 5734400
243713045 coderman2004 A Jan. 28, 2024, 5:51 a.m. OK Java 8 TESTS 6 124 0
243685674 EricM08 A Jan. 27, 2024, 10:02 p.m. OK Java 8 TESTS 6 124 0
243704001 saurabhchaubey112 A Jan. 28, 2024, 4:04 a.m. OK Java 8 TESTS 6 140 0
243694169 JASONZ454 A Jan. 28, 2024, 1:29 a.m. OK Java 8 TESTS 6 171 0
243712564 ycnetsisnoc A Jan. 28, 2024, 5:46 a.m. OK Java 8 TESTS 6 342 0
243688350 FuryCodeRoad A Jan. 27, 2024, 10:57 p.m. OK Java 8 TESTS 6 436 0
243673066 Yashs-7 A Jan. 27, 2024, 7:38 p.m. OK MS C++ 2017 TESTS 6 0 0
243696296 vermagaurav851 A Jan. 28, 2024, 2:09 a.m. OK MS C++ 2017 TESTS 6 15 0
243695587 ng_jahkhanh39 A Jan. 28, 2024, 1:57 a.m. OK MS C++ 2017 TESTS 6 31 0
243689496 crapcode A Jan. 27, 2024, 11:24 p.m. OK PHP TESTS 6 77 0
243704254 Elmurat A Jan. 28, 2024, 4:07 a.m. OK PyPy 3 TESTS 6 139 2150400
243705086 ayushmanpandey A Jan. 28, 2024, 4:19 a.m. OK PyPy 3 TESTS 6 140 3276800
243703509 deveshbedmutha A Jan. 28, 2024, 3:56 a.m. OK PyPy 3 TESTS 6 155 3686400
243690292 lrx___ A Jan. 27, 2024, 11:44 p.m. OK PyPy 3 TESTS 6 155 5222400
243684626 chandralohit1234 A Jan. 27, 2024, 9:44 p.m. OK PyPy 3 TESTS 6 156 2662400
243682606 nealzane A Jan. 27, 2024, 9:16 p.m. OK PyPy 3 TESTS 6 202 4812800
243665196 gardengnome A Jan. 27, 2024, 6:45 p.m. OK PyPy 3-64 TESTS 6 62 1843200
243680115 sanctus A Jan. 27, 2024, 8:45 p.m. OK PyPy 3-64 TESTS 6 62 2662400
243676854 NitroSpear A Jan. 27, 2024, 8:11 p.m. OK PyPy 3-64 TESTS 6 62 3481600
243689933 MdAbedin A Jan. 27, 2024, 11:34 p.m. OK PyPy 3-64 TESTS 6 77 2048000
243688834 beastboss A Jan. 27, 2024, 11:09 p.m. OK PyPy 3-64 TESTS 6 77 2355200
243688803 RobinFromTheHood A Jan. 27, 2024, 11:08 p.m. OK PyPy 3-64 TESTS 6 77 3276800
243704185 Mohamed_Hamed A Jan. 28, 2024, 4:06 a.m. OK PyPy 3-64 TESTS 6 77 3788800
243694116 happypotter A Jan. 28, 2024, 1:28 a.m. OK PyPy 3-64 TESTS 6 93 2252800
243703465 siddhantnema A Jan. 28, 2024, 3:56 a.m. OK PyPy 3-64 TESTS 6 93 2457600
243670378 Mathwiz_on_AoPS A Jan. 27, 2024, 7:19 p.m. OK PyPy 3-64 TESTS 6 93 2457600
243673603 OLOGY A Jan. 27, 2024, 7:42 p.m. OK Python 2 TESTS 6 109 102400
243708373 irfanhbhy A Jan. 28, 2024, 5:02 a.m. OK Python 3 TESTS 6 31 0
243705809 spatham A Jan. 28, 2024, 4:29 a.m. OK Python 3 TESTS 6 31 0
243702799 tempnobody A Jan. 28, 2024, 3:47 a.m. OK Python 3 TESTS 6 31 0
243695883 Harry_Haiyun A Jan. 28, 2024, 2:02 a.m. OK Python 3 TESTS 6 31 0
243681457 GodCrane A Jan. 27, 2024, 9:01 p.m. OK Python 3 TESTS 6 31 0
243680987 jaiswaldevansh27 A Jan. 27, 2024, 8:55 p.m. OK Python 3 TESTS 6 31 0
243669192 eugalt A Jan. 27, 2024, 7:10 p.m. OK Python 3 TESTS 6 31 0
243712958 manoharsingh2402 A Jan. 28, 2024, 5:50 a.m. OK Python 3 TESTS 6 46 0
243706327 FransValli A Jan. 28, 2024, 4:35 a.m. OK Python 3 TESTS 6 46 0
243703232 madhavG A Jan. 28, 2024, 3:53 a.m. OK Python 3 TESTS 6 46 0
243701777 TecTrixer A Jan. 28, 2024, 3:33 a.m. OK Rust 2021 TESTS 6 0 0
243710767 PLA_Nh A Jan. 28, 2024, 5:28 a.m. OK Rust 2021 TESTS 6 15 0
243678480 spookywooky A Jan. 27, 2024, 8:28 p.m. OK Rust 2021 TESTS 6 31 102400

remove filters

Back to search problems