Educational Codeforces Round 119 (Rated for 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
1620 Educational Codeforces Round 119 (Rated for Div. 2) FINISHED False 7200 97424663 Dec. 18, 2021, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6689 ) C BA-String PROGRAMMING bitmasks brute force dp greedy implementation math shortest paths

B'You are given an integer k and a string s that consists only of characters 'a ' (a lowercase Latin letter) and '* ' (an asterisk). Each asterisk should be replaced with several (from 0 to k inclusive) lowercase Latin letters 'b '. Different asterisk can be replaced with different counts of letter 'b '. The result of the replacement is called a BA-string. Two strings a and b are different if they either have different lengths or there exists such a position i that a_i neq b_i . A string a is lexicographically smaller than a string b if and only if one of the following holds: Now consider all different BA-strings and find the x -th lexicographically smallest of them. The first line contains a single integer t ( 1 <= t <= 2000 ) -- the number of testcases. The first line of each testcase contains three integers n , k and x ( 1 <= n <= 2000 ; 0 <= k <= 2000 ; 1 <= x <= 10^{18} ). n is the length of string s . The second line of each testcase is a string s . It consists of n characters, each of them is either 'a ' (a lowercase Latin letter) or '* ' (an asterisk). The sum of n over all testcases doesn 't exceed 2000 . For each testcase x doesn 't exceed the total number of different BA-strings. String s contains at least one character 'a '. For each testcase, print a single string, consisting only of characters 'b ' and 'a ' (lowercase Latin letters) -- the x -th lexicographically smallest BA-string. In the first testcase of the example, BA-strings ordered lexicographically are: In the second testcase of the example, BA-strings ordered lexicographically are: Note that string "aba" is only counted once, even though there are two ways to replace asterisks with characters 'b ' to get it. '...

Tutorials

98061

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
139856341 sahilchaudhari2405 C Dec. 19, 2021, 5:19 a.m. OK Clang++17 Diagnostics TESTS 7 342 31232000
139853385 ssvb C Dec. 19, 2021, 4:17 a.m. OK D TESTS 7 15 15257600
139844866 gxlois C Dec. 18, 2021, 11:19 p.m. OK D TESTS 7 78 4198400
139838191 eastnman C Dec. 18, 2021, 8:30 p.m. OK Delphi TESTS 7 93 8089600
139885829 LeoPro C Dec. 19, 2021, 11:40 a.m. OK FPC TESTS 7 202 17100800
139871376 Mrgglock C Dec. 19, 2021, 8:46 a.m. OK GNU C11 TESTS 7 15 0
139827818 ProgrammatorZihad C Dec. 18, 2021, 6:20 p.m. OK GNU C++14 TESTS 7 15 3993600
139870709 mepiyush2000 C Dec. 19, 2021, 8:38 a.m. OK GNU C++14 TESTS 7 15 7987200
139868669 darknight0409 C Dec. 19, 2021, 8:11 a.m. OK GNU C++14 TESTS 7 15 7987200
139858290 mohits C Dec. 19, 2021, 5:50 a.m. OK GNU C++14 TESTS 7 15 7987200
139894782 frog007 C Dec. 19, 2021, 1:18 p.m. OK GNU C++14 TESTS 7 15 7987200
139880825 bool_sheet C Dec. 19, 2021, 10:44 a.m. OK GNU C++14 TESTS 7 15 7987200
139892432 Sustech7 C Dec. 19, 2021, 12:50 p.m. OK GNU C++14 TESTS 7 15 11878400
139849554 touristyyds C Dec. 19, 2021, 2:27 a.m. OK GNU C++14 TESTS 7 15 11980800
139884065 _MINECRAFT___ C Dec. 19, 2021, 11:19 a.m. OK GNU C++14 TESTS 7 15 12083200
139899980 swsti C Dec. 19, 2021, 1:51 p.m. OK GNU C++14 TESTS 7 15 12083200
139915460 ujjval_0908 C Dec. 19, 2021, 5:10 p.m. OK GNU C++17 TESTS 7 15 3993600
139911828 ayerhs_7 C Dec. 19, 2021, 4:20 p.m. OK GNU C++17 TESTS 7 15 3993600
139905606 Purnadip_Chakrabarti C Dec. 19, 2021, 2:57 p.m. OK GNU C++17 TESTS 7 15 3993600
139883261 capricious_ C Dec. 19, 2021, 11:10 a.m. OK GNU C++17 TESTS 7 15 3993600
139880565 ujjval_0908 C Dec. 19, 2021, 10:41 a.m. OK GNU C++17 TESTS 7 15 3993600
139863217 lelouch-of-the-code C Dec. 19, 2021, 7:01 a.m. OK GNU C++17 TESTS 7 15 3993600
139848347 shinchankosen C Dec. 19, 2021, 1:49 a.m. OK GNU C++17 TESTS 7 15 3993600
139848319 shinchankosen C Dec. 19, 2021, 1:48 a.m. OK GNU C++17 TESTS 7 15 3993600
139829993 LRJf C Dec. 18, 2021, 6:41 p.m. OK GNU C++17 TESTS 7 15 3993600
139919836 pandeykushagra51 C Dec. 19, 2021, 6:08 p.m. OK GNU C++17 TESTS 7 15 3993600
139862114 jaypalmudaliyar24 C Dec. 19, 2021, 6:45 a.m. OK GNU C++17 (64) TESTS 7 15 7987200
139919501 dgupta0812 C Dec. 19, 2021, 6:03 p.m. OK GNU C++17 (64) TESTS 7 15 7987200
139902926 Elias_Obeid C Dec. 19, 2021, 2:23 p.m. OK GNU C++17 (64) TESTS 7 15 7987200
139879969 tanmay.raj.29 C Dec. 19, 2021, 10:34 a.m. OK GNU C++17 (64) TESTS 7 15 7987200
139879769 tanmay.raj.29 C Dec. 19, 2021, 10:32 a.m. OK GNU C++17 (64) TESTS 7 15 7987200
139859840 Kevin_pbw C Dec. 19, 2021, 6:15 a.m. OK GNU C++17 (64) TESTS 7 15 7987200
139857532 Rushu C Dec. 19, 2021, 5:38 a.m. OK GNU C++17 (64) TESTS 7 15 7987200
139854151 diyora13 C Dec. 19, 2021, 4:35 a.m. OK GNU C++17 (64) TESTS 7 15 7987200
139830206 huayouhan C Dec. 18, 2021, 6:42 p.m. OK GNU C++17 (64) TESTS 7 15 8089600
139930793 mingoster1337 C Dec. 19, 2021, 9:38 p.m. OK GNU C++17 (64) TESTS 7 15 11980800
139920798 avineshpandey C Dec. 19, 2021, 6:21 p.m. OK GNU C++20 (64) TESTS 7 0 11980800
139841398 tiagoshibata C Dec. 18, 2021, 9:37 p.m. OK GNU C++20 (64) TESTS 7 15 3993600
139845493 fmota C Dec. 18, 2021, 11:44 p.m. OK GNU C++20 (64) TESTS 7 15 3993600
139869592 zstu20liuzhe C Dec. 19, 2021, 8:23 a.m. OK GNU C++20 (64) TESTS 7 15 4300800
139859405 mahestippi C Dec. 19, 2021, 6:09 a.m. OK GNU C++20 (64) TESTS 7 15 7987200
139856808 amritsingh1 C Dec. 19, 2021, 5:27 a.m. OK GNU C++20 (64) TESTS 7 15 7987200
139937576 fakhoury C Dec. 20, 2021, 2:30 a.m. OK GNU C++20 (64) TESTS 7 15 7987200
139840145 fogsail C Dec. 18, 2021, 9:08 p.m. OK GNU C++20 (64) TESTS 7 15 7987200
139831661 master._.mind C Dec. 18, 2021, 6:58 p.m. OK GNU C++20 (64) TESTS 7 15 7987200
139855349 NadmanKhan C Dec. 19, 2021, 5 a.m. OK GNU C++20 (64) TESTS 7 15 7987200
139924976 LeGuitariste C Dec. 19, 2021, 7:30 p.m. OK Haskell TESTS 7 233 0
139850895 pe1326263755 C Dec. 19, 2021, 3:11 a.m. OK Haskell TESTS 7 265 5324800
139897766 herschelle19045 C Dec. 19, 2021, 1:27 p.m. OK Java 11 TESTS 7 186 0
139918356 herschelle19045 C Dec. 19, 2021, 5:48 p.m. OK Java 11 TESTS 7 187 0
139872699 kartheek542 C Dec. 19, 2021, 9:03 a.m. OK Java 11 TESTS 7 187 0
139918222 herschelle19045 C Dec. 19, 2021, 5:46 p.m. OK Java 11 TESTS 7 202 0
139912596 sumitchavan C Dec. 19, 2021, 4:30 p.m. OK Java 11 TESTS 7 217 4505600
139952688 SavageClown007 C Dec. 20, 2021, 5:15 a.m. OK Java 11 TESTS 7 217 4608000
139934250 anubhav44044 C Dec. 19, 2021, 11:45 p.m. OK Java 11 TESTS 7 217 5222400
139870674 ddwuya C Dec. 19, 2021, 8:37 a.m. OK Java 11 TESTS 7 218 4608000
139839096 prituladima C Dec. 18, 2021, 8:45 p.m. OK Java 11 TESTS 7 218 4608000
139885914 chevish C Dec. 19, 2021, 11:40 a.m. OK Java 11 TESTS 7 234 4505600
139842991 NerfThis C Dec. 18, 2021, 10:18 p.m. OK Java 8 TESTS 7 109 14848000
139846467 invincible777 C Dec. 19, 2021, 12:33 a.m. OK Java 8 TESTS 7 124 14950400
139845848 invincible777 C Dec. 19, 2021, 12:03 a.m. OK Java 8 TESTS 7 124 14950400
139862626 harshsingla06 C Dec. 19, 2021, 6:53 a.m. OK Java 8 TESTS 7 124 15155200
139845786 invincible777 C Dec. 19, 2021, midnight OK Java 8 TESTS 7 139 14950400
139869902 guru1603 C Dec. 19, 2021, 8:27 a.m. OK Java 8 TESTS 7 156 31027200
139840230 shinghalrishabh C Dec. 18, 2021, 9:10 p.m. OK Java 8 TESTS 7 170 15155200
139829035 pras7946 C Dec. 18, 2021, 6:30 p.m. OK Java 8 TESTS 7 171 15155200
139861320 lzwjava C Dec. 19, 2021, 6:35 a.m. OK Java 8 TESTS 7 171 41472000
139937038 golions C Dec. 20, 2021, 2:07 a.m. OK Java 8 TESTS 7 233 15360000
139827779 mishagam C Dec. 18, 2021, 6:20 p.m. OK Kotlin 1.5 TESTS 7 327 50790400
139926596 RYG28 C Dec. 19, 2021, 7:59 p.m. OK Kotlin 1.5 TESTS 7 670 57651200
139925729 13coder C Dec. 19, 2021, 7:43 p.m. OK MS C++ 2017 TESTS 7 15 7987200
139888249 IvanRozb C Dec. 19, 2021, 12:04 p.m. OK MS C++ 2017 TESTS 7 30 13926400
139910440 misaka12435 C Dec. 19, 2021, 4:02 p.m. OK MS C++ 2017 TESTS 7 186 0
139892337 sgly33 C Dec. 19, 2021, 12:49 p.m. OK MS C++ 2017 TESTS 7 217 9932800
139893821 sgly33 C Dec. 19, 2021, 1:07 p.m. OK MS C++ 2017 TESTS 7 218 0
139859985 andreyDagger C Dec. 19, 2021, 6:17 a.m. OK MS C++ 2017 TESTS 7 234 0
139866630 you1234 C Dec. 19, 2021, 7:46 a.m. OK PyPy 2 TESTS 7 404 134656000
139866777 you1234 C Dec. 19, 2021, 7:48 a.m. OK PyPy 2 TESTS 7 421 202854400
139867221 you1234 C Dec. 19, 2021, 7:53 a.m. OK PyPy 2 TESTS 7 436 98304000
139866389 you1234 C Dec. 19, 2021, 7:43 a.m. OK PyPy 2 TESTS 7 451 91443200
139866588 you1234 C Dec. 19, 2021, 7:45 a.m. OK PyPy 2 TESTS 7 452 86937600
139867452 you1234 C Dec. 19, 2021, 7:56 a.m. OK PyPy 2 TESTS 7 1263 99737600
139952017 Terryobeyes C Dec. 20, 2021, 5:01 a.m. OK PyPy 3 TESTS 7 77 13414400
139924423 unknownSolver C Dec. 19, 2021, 7:19 p.m. OK PyPy 3 TESTS 7 295 14848000
139875686 NirmalScaria1 C Dec. 19, 2021, 9:40 a.m. OK PyPy 3 TESTS 7 295 18944000
139906011 vaibhav_india C Dec. 19, 2021, 3:02 p.m. OK PyPy 3 TESTS 7 311 14950400
139846571 hxu10 C Dec. 19, 2021, 12:37 a.m. OK PyPy 3 TESTS 7 311 14950400
139887221 shantol C Dec. 19, 2021, 11:53 a.m. OK PyPy 3 TESTS 7 311 17612800
139937777 Youarenotgood C Dec. 20, 2021, 2:38 a.m. OK PyPy 3 TESTS 7 311 18841600
139902061 YogaVicky C Dec. 19, 2021, 2:13 p.m. OK PyPy 3 TESTS 7 311 18841600
139869096 Iltasks C Dec. 19, 2021, 8:16 a.m. OK PyPy 3 TESTS 7 311 18841600
139929325 tssslu C Dec. 19, 2021, 9 p.m. OK PyPy 3 TESTS 7 311 18944000
139862303 mnkp C Dec. 19, 2021, 6:48 a.m. OK PyPy 3-64 TESTS 7 124 15974400
139854897 covid01 C Dec. 19, 2021, 4:51 a.m. OK PyPy 3-64 TESTS 7 295 10444800
139894481 HelioSpook C Dec. 19, 2021, 1:15 p.m. OK PyPy 3-64 TESTS 7 296 14745600
139962257 rutz12 C Dec. 20, 2021, 5:41 a.m. OK PyPy 3-64 TESTS 7 296 24064000
139918479 jakubd C Dec. 19, 2021, 5:50 p.m. OK PyPy 3-64 TESTS 7 311 16384000
139878537 shingoo_kang C Dec. 19, 2021, 10:16 a.m. OK PyPy 3-64 TESTS 7 311 17203200
139931486 stand_by C Dec. 19, 2021, 9:56 p.m. OK PyPy 3-64 TESTS 7 327 27750400
139889296 Malek_souissi C Dec. 19, 2021, 12:15 p.m. OK PyPy 3-64 TESTS 7 342 22937600
139873747 lemiao12 C Dec. 19, 2021, 9:16 a.m. OK PyPy 3-64 TESTS 7 342 26624000
139910967 anee_mangal C Dec. 19, 2021, 4:09 p.m. OK PyPy 3-64 TESTS 7 342 28979200
139866407 you1234 C Dec. 19, 2021, 7:43 a.m. OK Python 2 TESTS 7 841 57241600
139867268 you1234 C Dec. 19, 2021, 7:54 a.m. OK Python 2 TESTS 7 919 56115200
139951191 LRJf C Dec. 20, 2021, 4:43 a.m. OK Python 3 TESTS 7 46 11980800
139927686 PaalB C Dec. 19, 2021, 8:21 p.m. OK Python 3 TESTS 7 46 11980800
139889153 Leeisateam C Dec. 19, 2021, 12:14 p.m. OK Python 3 TESTS 7 61 7680000
139889031 Leeisateam C Dec. 19, 2021, 12:12 p.m. OK Python 3 TESTS 7 61 7680000
139843350 eugalt C Dec. 18, 2021, 10:28 p.m. OK Python 3 TESTS 7 61 7680000
139840730 eugalt C Dec. 18, 2021, 9:22 p.m. OK Python 3 TESTS 7 61 7680000
139866402 ashish_chiks_75 C Dec. 19, 2021, 7:43 a.m. OK Python 3 TESTS 7 61 7884800
139906827 kingutus C Dec. 19, 2021, 3:12 p.m. OK Python 3 TESTS 7 61 11980800
139935491 eugalt C Dec. 20, 2021, 12:46 a.m. OK Python 3 TESTS 7 62 7680000
139888921 Leeisateam C Dec. 19, 2021, 12:11 p.m. OK Python 3 TESTS 7 62 7680000
139935014 clause C Dec. 20, 2021, 12:22 a.m. OK Rust 2021 TESTS 7 15 7372800
139833068 takezawa C Dec. 18, 2021, 7:16 p.m. OK Rust 2021 TESTS 7 15 7987200
139832062 takezawa C Dec. 18, 2021, 7:03 p.m. OK Rust 2021 TESTS 7 30 8089600
139921255 lxk C Dec. 19, 2021, 6:28 p.m. OK Rust 2021 TESTS 7 31 102400

remove filters

Back to search problems