Codeforces Round 553 (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
1151 Codeforces Round 553 (Div. 2) FINISHED False 7200 176221499 April 18, 2019, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11232 ) A Maxim and Biology PROGRAMMING brute force strings 1000

B'Today in the scientific lyceum of the Kingdom of Kremland, there was a biology lesson. The topic of the lesson was the genomes. Let 's call the genome the string "ACTG". Maxim was very boring to sit in class, so the teacher came up with a task for him: on a given string s consisting of uppercase letters and length of at least 4 , you need to find the minimum number of operations that you need to apply, so that the genome appears in it as a substring. For one operation, you can replace any letter in the string s with the next or previous in the alphabet. For example, for the letter "D" the previous one will be "C", and the next -- "E". In this problem, we assume that for the letter "A", the previous one will be the letter "Z", and the next one will be "B", and for the letter "Z", the previous one is the letter "Y", and the next one is the letter "A". Help Maxim solve the problem that the teacher gave him. A string a is a substring of a string b if a can be obtained from b by deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end. The first line contains a single integer n ( 4 <= q n <= q 50 ) -- the length of the string s . The second line contains the string s , consisting of exactly n uppercase letters of the Latin alphabet. Output the minimum number of operations that need to be applied to the string s so that the genome appears as a substring in it. In the first example, you should replace the letter "Z" with "A" for one operation, the letter "H" -- with the letter "G" for one operation. You will get the string "ACTG", in which the genome is present as a substring. In the second example, we replace the letter "A" with "C" for two operations, the letter "D" -- with the letter "A" for three operations. You will get the string "ZACTG", in which there is a genome. '...

Tutorials

Codeforces Round #553 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
60757223 ReiAyanami A Sept. 18, 2019, 9:30 a.m. OK Clang++17 Diagnostics TESTS 36 46 0 1000
55679408 yashkgupta3 A June 17, 2019, 12:14 p.m. OK Clang++17 Diagnostics TESTS 36 46 0 1000
56950401 vjudge5 A July 13, 2019, 1:52 a.m. OK Clang++17 Diagnostics TESTS 36 46 0 1000
62386448 vjudge2 A Oct. 11, 2019, 9:42 p.m. OK Clang++17 Diagnostics TESTS 36 46 1126400 1000
61774733 rossoliny A Oct. 3, 2019, 11:22 a.m. OK Clang++17 Diagnostics TESTS 36 62 0 1000
55267659 xcodevn A June 7, 2019, 2:44 p.m. OK D TESTS 36 31 0 1000
52963527 old_boo A April 18, 2019, 3:50 p.m. OK D TESTS 36 31 0 1000
52963950 cedretaber A April 18, 2019, 3:52 p.m. OK D TESTS 36 31 0 1000
52962658 fluffyowl A April 18, 2019, 3:47 p.m. OK D TESTS 36 31 0 1000
52963273 daut-dlang A April 18, 2019, 3:49 p.m. OK D TESTS 36 31 0 1000
53008694 CoolTurkey A April 19, 2019, 10:59 a.m. OK D TESTS 36 31 102400 1000
52977597 iica A April 18, 2019, 4:58 p.m. OK D TESTS 36 31 102400 1000
53054588 Denor A April 20, 2019, 4:32 p.m. OK Delphi TESTS 36 31 102400 1000
52967571 ruban A April 18, 2019, 4:06 p.m. OK Delphi TESTS 36 31 14643200 1000
52961229 TheHedgehog A April 18, 2019, 3:42 p.m. OK Delphi TESTS 36 31 19148800 1000
52976833 HQT2003 A April 18, 2019, 4:53 p.m. OK FPC TESTS 36 30 307200 1000
53017036 minh04 A April 19, 2019, 2:38 p.m. OK FPC TESTS 36 31 0 1000
53730877 samau07012005 A May 4, 2019, 7:08 a.m. OK FPC TESTS 36 31 102400 1000
53098742 Lucky_Noob A April 21, 2019, 3:05 p.m. OK FPC TESTS 36 31 102400 1000
52978676 giahung.nguyentrong A April 18, 2019, 5:05 p.m. OK FPC TESTS 36 31 102400 1000
52972445 bao-gpmn A April 18, 2019, 4:28 p.m. OK FPC TESTS 36 31 102400 1000
52971623 d4rkn19ht A April 18, 2019, 4:24 p.m. OK FPC TESTS 36 31 102400 1000
52968134 Just_Matvey A April 18, 2019, 4:08 p.m. OK FPC TESTS 36 31 102400 1000
52965178 PAG A April 18, 2019, 3:56 p.m. OK FPC TESTS 36 31 102400 1000
52963677 EgorShibaev A April 18, 2019, 3:51 p.m. OK FPC TESTS 36 31 102400 1000
53179472 MortyThePlatypus A April 23, 2019, 6:41 a.m. OK GNU C11 TESTS 36 15 0 1000
52963906 Ruadh A April 18, 2019, 3:52 p.m. OK GNU C11 TESTS 36 15 0 1000
52979102 r_kumar261 A April 18, 2019, 5:08 p.m. OK GNU C11 TESTS 36 15 0 1000
52969126 6553368 A April 18, 2019, 4:12 p.m. OK GNU C11 TESTS 36 30 0 1000
52968116 triggered_Man A April 18, 2019, 4:08 p.m. OK GNU C11 TESTS 36 30 0 1000
55849375 MHHasan A June 21, 2019, 2:06 a.m. OK GNU C11 TESTS 36 30 0 1000
52997072 nahidulhemal123 A April 19, 2019, 4:43 a.m. OK GNU C11 TESTS 36 30 0 1000
52996866 SAJIB.. A April 19, 2019, 4:33 a.m. OK GNU C11 TESTS 36 30 0 1000
52976677 Emily50 A April 18, 2019, 4:52 p.m. OK GNU C11 TESTS 36 30 0 1000
52971071 kiyoshi0205 A April 18, 2019, 4:21 p.m. OK GNU C11 TESTS 36 30 0 1000
62542151 LittleBeetle A Oct. 14, 2019, 4:14 a.m. OK GNU C++11 TESTS 36 15 0 1000
52961628 jjsuarestra99 A April 18, 2019, 3:43 p.m. OK GNU C++11 TESTS 36 15 0 1000
53125697 dengyaotriangle A April 22, 2019, 1:45 p.m. OK GNU C++11 TESTS 36 15 0 1000
54566957 Sesha.Sasi A May 24, 2019, 5 p.m. OK GNU C++11 TESTS 36 15 0 1000
53037340 _abcd_ A April 20, 2019, 8:01 a.m. OK GNU C++11 TESTS 36 15 102400 1000
52992323 djh123 A April 18, 2019, 11:49 p.m. OK GNU C++11 TESTS 36 15 204800 1000
52961183 lethalboy A April 18, 2019, 3:42 p.m. OK GNU C++11 TESTS 36 15 10035200 1000
68705545 zhan1 A Jan. 13, 2020, 11:09 a.m. OK GNU C++11 TESTS 36 30 0 1000
66984337 ds32 A Dec. 15, 2019, 5:31 p.m. OK GNU C++11 TESTS 36 30 0 1000
66210474 liuweih A Dec. 3, 2019, 6:26 a.m. OK GNU C++11 TESTS 36 30 0 1000
66004674 M.A.D A Nov. 29, 2019, 8:47 p.m. OK GNU C++14 TESTS 36 15 0 1000
64606210 xTamales A Nov. 9, 2019, 8:49 p.m. OK GNU C++14 TESTS 36 15 0 1000
63979905 naranja011223 A Nov. 1, 2019, 9:54 a.m. OK GNU C++14 TESTS 36 15 0 1000
62931693 codrex A Oct. 19, 2019, 12:54 p.m. OK GNU C++14 TESTS 36 15 0 1000
60453573 h1tman_abhi A Sept. 12, 2019, 4:57 p.m. OK GNU C++14 TESTS 36 15 0 1000
60348476 prakarsh A Sept. 10, 2019, 1:26 p.m. OK GNU C++14 TESTS 36 15 0 1000
57878907 alechuang98 A July 28, 2019, 6:50 a.m. OK GNU C++14 TESTS 36 15 0 1000
56753952 arv77 A July 9, 2019, 1:05 p.m. OK GNU C++14 TESTS 36 15 0 1000
56680059 vjudge3 A July 7, 2019, 5:48 p.m. OK GNU C++14 TESTS 36 15 0 1000
56149244 Black_hat123 A June 27, 2019, 7:33 a.m. OK GNU C++14 TESTS 36 15 0 1000
55681747 anothertrie A June 17, 2019, 1:24 p.m. OK GNU C++17 TESTS 36 15 0 1000
56710384 anonym021196 A July 8, 2019, 12:32 p.m. OK GNU C++17 TESTS 36 15 0 1000
57705777 BugsBunny A July 24, 2019, 7:56 p.m. OK GNU C++17 TESTS 36 15 0 1000
57837166 chenyl A July 27, 2019, 7:59 a.m. OK GNU C++17 TESTS 36 15 0 1000
60914551 rahulsinha2911 A Sept. 20, 2019, 7:32 a.m. OK GNU C++17 TESTS 36 15 0 1000
62260739 L_lawliet27 narayanpai1 maverick16 A Oct. 10, 2019, 12:08 p.m. OK GNU C++17 TESTS 36 15 0 1000
65299687 _bmt_ A Nov. 18, 2019, 12:48 p.m. OK GNU C++17 TESTS 36 15 0 1000
65299711 Foundnt_Alice A Nov. 18, 2019, 12:48 p.m. OK GNU C++17 TESTS 36 15 0 1000
66212548 Jyqjyq1 A Dec. 3, 2019, 7:30 a.m. OK GNU C++17 TESTS 36 15 0 1000
69546363 suryasiriki2 A Jan. 26, 2020, 3:07 a.m. OK GNU C++17 TESTS 36 15 0 1000
62655132 120405217 A Oct. 16, 2019, 12:48 a.m. OK Go TESTS 36 31 0 1000
53112370 b0n0n A April 22, 2019, 4:47 a.m. OK Go TESTS 36 31 0 1000
53003547 mayank1601 A April 19, 2019, 8:25 a.m. OK Go TESTS 36 31 0 1000
53003473 mayank1601 A April 19, 2019, 8:23 a.m. OK Go TESTS 36 31 0 1000
54568523 tony_stark1 A May 24, 2019, 5:52 p.m. OK Go TESTS 36 46 0 1000
53111876 b0n0n A April 22, 2019, 4:06 a.m. OK Go TESTS 36 46 0 1000
52960933 u1s1reallycai A April 18, 2019, 3:41 p.m. OK Go TESTS 36 46 0 1000
53088990 Laurens A April 21, 2019, 10:16 a.m. OK Haskell TESTS 36 46 102400 1000
52991426 code_report A April 18, 2019, 10:37 p.m. OK Haskell TESTS 36 46 102400 1000
52962623 iltep64 A April 18, 2019, 3:47 p.m. OK Haskell TESTS 36 46 102400 1000
64782587 Shmimy A Nov. 13, 2019, 7:51 a.m. OK Java 11 TESTS 36 187 0 1000
64725595 Beta_Tumse_Na_Ho_Paega A Nov. 12, 2019, 6:18 a.m. OK Java 11 TESTS 36 218 0 1000
58549679 MagentaCobra A Aug. 10, 2019, 6:54 p.m. OK Java 8 TESTS 36 108 0 1000
58162297 LOBsTerr A Aug. 2, 2019, 7:51 a.m. OK Java 8 TESTS 36 108 0 1000
53991013 shivendra12119 A May 11, 2019, 12:17 p.m. OK Java 8 TESTS 36 108 0 1000
53398453 spar5h A April 27, 2019, 10:21 a.m. OK Java 8 TESTS 36 108 0 1000
53177302 habibulka A April 23, 2019, 4:54 a.m. OK Java 8 TESTS 36 108 0 1000
53126093 rathi062 A April 22, 2019, 2:05 p.m. OK Java 8 TESTS 36 108 0 1000
53093698 joeavic A April 21, 2019, 12:27 p.m. OK Java 8 TESTS 36 108 0 1000
53016544 marcose18 A April 19, 2019, 2:26 p.m. OK Java 8 TESTS 36 108 0 1000
52979868 hamdi.haddad A April 18, 2019, 5:14 p.m. OK Java 8 TESTS 36 108 0 1000
68132632 Xylenox A Jan. 3, 2020, 5:34 p.m. OK Java 8 TESTS 36 109 0 1000
53002966 akhankussainov A April 19, 2019, 8:07 a.m. OK JavaScript TESTS 36 31 0 1000
52964105 orazbek A April 18, 2019, 3:52 p.m. OK JavaScript TESTS 36 31 0 1000
53534514 I.A.K.O.V A April 30, 2019, 12:37 a.m. OK Kotlin TESTS 36 109 0 1000
53053994 seirion A April 20, 2019, 4:11 p.m. OK Kotlin TESTS 36 140 0 1000
52963138 timurtibeyev A April 18, 2019, 3:49 p.m. OK Kotlin TESTS 36 140 0 1000
54754329 z39 A May 28, 2019, 2:18 p.m. OK Kotlin TESTS 36 140 819200 1000
58385969 Spheniscine A Aug. 6, 2019, 11:58 a.m. OK Kotlin TESTS 36 156 204800 1000
53067626 wbars A April 20, 2019, 7:03 p.m. OK Kotlin TESTS 36 170 0 1000
58385840 Spheniscine A Aug. 6, 2019, 11:55 a.m. OK Kotlin TESTS 36 171 1433600 1000
53118963 lewasupaman SaurumanS LapsleyJuno A April 22, 2019, 10:04 a.m. OK Mono C# TESTS 36 46 0 1000
52974126 mircea85 A April 18, 2019, 4:37 p.m. OK Mono C# TESTS 36 46 0 1000
52964191 SantiC A April 18, 2019, 3:53 p.m. OK Mono C# TESTS 36 46 0 1000
55695162 mr-meeseeks A June 17, 2019, 9:05 p.m. OK Mono C# TESTS 36 46 0 1000
54995095 sevimlikedicik A June 2, 2019, 10:18 p.m. OK Mono C# TESTS 36 46 0 1000
54665551 camypaper A May 26, 2019, 1:08 p.m. OK Mono C# TESTS 36 46 0 1000
53810823 Salatik231166 A May 6, 2019, 6:33 a.m. OK Mono C# TESTS 36 61 0 1000
52999171 fr0st A April 19, 2019, 6:08 a.m. OK Mono C# TESTS 36 61 0 1000
53021404 nastya1199 A April 19, 2019, 4:38 p.m. OK Mono C# TESTS 36 61 0 1000
52970588 Giangvp A April 18, 2019, 4:19 p.m. OK Mono C# TESTS 36 61 0 1000
53088337 timtimX A April 21, 2019, 9:56 a.m. OK MS C++ TESTS 36 15 0 1000
54162701 vjudge4 A May 15, 2019, 7:19 a.m. OK MS C++ TESTS 36 30 0 1000
53775107 vjudge4 A May 5, 2019, 7:49 a.m. OK MS C++ TESTS 36 30 0 1000
53774519 vjudge3 A May 5, 2019, 7:30 a.m. OK MS C++ TESTS 36 30 0 1000
53773904 vjudge4 A May 5, 2019, 7:10 a.m. OK MS C++ TESTS 36 30 0 1000
55652856 vjudge3 A June 16, 2019, 3:29 p.m. OK MS C++ TESTS 36 30 0 1000
54323745 vjudge5 A May 18, 2019, 12:30 a.m. OK MS C++ TESTS 36 30 0 1000
54159702 vjudge4 A May 15, 2019, 5:57 a.m. OK MS C++ TESTS 36 30 0 1000
68689519 vjudge1 A Jan. 13, 2020, 5:25 a.m. OK MS C++ TESTS 36 30 0 1000
66270291 vjudge2 A Dec. 4, 2019, 12:04 p.m. OK MS C++ TESTS 36 30 0 1000
52967033 cyfhwg A April 18, 2019, 4:04 p.m. OK MS C++ 2017 TESTS 36 30 0 1000
68962176 vjudge1 A Jan. 17, 2020, 2:04 a.m. OK MS C++ 2017 TESTS 36 30 0 1000
53008572 Hamster_ A April 19, 2019, 10:55 a.m. OK MS C++ 2017 TESTS 36 30 0 1000
62673642 Moen1578 A Oct. 16, 2019, 10:43 a.m. OK MS C++ 2017 TESTS 36 31 0 1000
69837667 Mad112233 A Jan. 30, 2020, 12:17 p.m. OK MS C++ 2017 TESTS 36 31 0 1000
69433776 Still_Theory A Jan. 23, 2020, 6:12 p.m. OK MS C++ 2017 TESTS 36 31 0 1000
68969994 vjudge5 A Jan. 17, 2020, 6:37 a.m. OK MS C++ 2017 TESTS 36 31 0 1000
68709801 vjudge3 A Jan. 13, 2020, 12:36 p.m. OK MS C++ 2017 TESTS 36 31 0 1000
66271118 vjudge1 A Dec. 4, 2019, 12:20 p.m. OK MS C++ 2017 TESTS 36 31 0 1000
66268677 vjudge3 A Dec. 4, 2019, 11:29 a.m. OK MS C++ 2017 TESTS 36 31 0 1000
52962153 l-_-l A April 18, 2019, 3:45 p.m. OK PascalABC.NET TESTS 36 202 0 1000
53460736 AndreyStarostin A April 28, 2019, 7:03 a.m. OK PascalABC.NET TESTS 36 218 0 1000
52963561 mm944 A April 18, 2019, 3:50 p.m. OK PascalABC.NET TESTS 36 327 307200 1000
53013720 phenom001 A April 19, 2019, 1:14 p.m. OK PascalABC.NET TESTS 36 342 204800 1000
53863851 nokdoot A May 8, 2019, 1:04 a.m. OK Perl TESTS 36 46 0 1000
53863885 nokdoot A May 8, 2019, 1:07 a.m. OK Perl TESTS 36 46 102400 1000
52975474 corvinus82 A April 18, 2019, 4:45 p.m. OK Perl TESTS 36 124 2457600 1000
53907238 Priyank A May 9, 2019, 1:25 p.m. OK PHP TESTS 36 46 0 1000
52966155 CrazyDr A April 18, 2019, 4 p.m. OK PHP TESTS 36 46 0 1000
55411904 mayakin A June 10, 2019, 8:42 p.m. OK PHP TESTS 36 46 512000 1000
52996976 kpiiitb A April 19, 2019, 4:39 a.m. OK PyPy 2 TESTS 36 109 0 1000
52985900 thenewguy39 A April 18, 2019, 6:54 p.m. OK PyPy 2 TESTS 36 109 0 1000
53946226 codeseeker A May 10, 2019, 6:50 a.m. OK PyPy 2 TESTS 36 124 0 1000
53207841 alexwice A April 24, 2019, 1:08 a.m. OK PyPy 2 TESTS 36 124 0 1000
53006776 YESMAths A April 19, 2019, 9:59 a.m. OK PyPy 2 TESTS 36 124 0 1000
52992831 ilkerkosaroglu A April 19, 2019, 12:32 a.m. OK PyPy 2 TESTS 36 124 0 1000
52984748 aeternalis1 A April 18, 2019, 6:30 p.m. OK PyPy 2 TESTS 36 124 0 1000
52969510 aniket11 A April 18, 2019, 4:14 p.m. OK PyPy 2 TESTS 36 124 0 1000
52962486 supachai_pay A April 18, 2019, 3:46 p.m. OK PyPy 2 TESTS 36 124 0 1000
52961329 Jobless22 A April 18, 2019, 3:42 p.m. OK PyPy 2 TESTS 36 124 0 1000
58260695 xuzhengqi A Aug. 4, 2019, 12:05 p.m. OK PyPy 3 TESTS 36 124 0 1000
54782125 knight-erraunt A May 28, 2019, 11:16 p.m. OK PyPy 3 TESTS 36 124 0 1000
53114759 Mirali A April 22, 2019, 7:06 a.m. OK PyPy 3 TESTS 36 124 0 1000
53114236 kbats183 A April 22, 2019, 6:40 a.m. OK PyPy 3 TESTS 36 124 0 1000
53091859 pgimalac A April 21, 2019, 11:36 a.m. OK PyPy 3 TESTS 36 124 0 1000
53004912 brick_btv A April 19, 2019, 9:05 a.m. OK PyPy 3 TESTS 36 124 0 1000
52996333 parth_satodiya A April 19, 2019, 4:07 a.m. OK PyPy 3 TESTS 36 124 0 1000
52984797 Leendertz A April 18, 2019, 6:31 p.m. OK PyPy 3 TESTS 36 124 0 1000
52984782 SHOVON588 A April 18, 2019, 6:31 p.m. OK PyPy 3 TESTS 36 124 0 1000
52983494 yellowflash A April 18, 2019, 6:13 p.m. OK PyPy 3 TESTS 36 124 0 1000
54432336 franckmy A May 21, 2019, 1:23 a.m. OK Python 2 TESTS 36 171 0 1000
53490128 bsr011 A April 29, 2019, 7:58 a.m. OK Python 2 TESTS 36 171 0 1000
53293796 Helli.code A April 25, 2019, 4:42 p.m. OK Python 2 TESTS 36 171 0 1000
53110435 nealzane A April 22, 2019, 1:51 a.m. OK Python 2 TESTS 36 171 0 1000
53091929 monotonical21 A April 21, 2019, 11:38 a.m. OK Python 2 TESTS 36 171 0 1000
53091793 monotonical21 A April 21, 2019, 11:35 a.m. OK Python 2 TESTS 36 171 0 1000
52973812 daniel.carlos A April 18, 2019, 4:35 p.m. OK Python 2 TESTS 36 171 0 1000
52964687 shubhankarsharma00 A April 18, 2019, 3:54 p.m. OK Python 2 TESTS 36 171 0 1000
52963203 coderbd A April 18, 2019, 3:49 p.m. OK Python 2 TESTS 36 171 0 1000
52962268 bl4ckc4t A April 18, 2019, 3:46 p.m. OK Python 2 TESTS 36 171 0 1000
53665747 Caunos A May 2, 2019, 10:17 a.m. OK Python 3 TESTS 36 93 0 1000
60350302 ucantfindme A Sept. 10, 2019, 2:03 p.m. OK Python 3 TESTS 36 108 0 1000
54436509 The_Pacific_Ocean A May 21, 2019, 5:58 a.m. OK Python 3 TESTS 36 108 0 1000
54089387 aman1997verma A May 14, 2019, 9:44 a.m. OK Python 3 TESTS 36 108 0 1000
53302447 cs1g A April 25, 2019, 10:09 p.m. OK Python 3 TESTS 36 108 0 1000
53182394 lucad A April 23, 2019, 8:21 a.m. OK Python 3 TESTS 36 108 0 1000
53023159 quentin_ A April 19, 2019, 5:32 p.m. OK Python 3 TESTS 36 108 0 1000
52998646 achy97 A April 19, 2019, 5:49 a.m. OK Python 3 TESTS 36 108 0 1000
52994505 robustdeveloper A April 19, 2019, 2:32 a.m. OK Python 3 TESTS 36 108 0 1000
52986380 Eltoney A April 18, 2019, 7:06 p.m. OK Python 3 TESTS 36 108 0 1000
52961808 geckods A April 18, 2019, 3:44 p.m. OK Ruby TESTS 36 62 0 1000
52995118 duanhv A April 19, 2019, 3:07 a.m. OK Ruby TESTS 36 62 102400 1000
52966571 duanhv A April 18, 2019, 4:02 p.m. OK Ruby TESTS 36 78 0 1000
53026204 MiniCube A April 19, 2019, 7:20 p.m. OK Ruby TESTS 36 109 0 1000
52977997 aravk33 A April 18, 2019, 5:01 p.m. OK Rust TESTS 36 31 0 1000
53094050 rom2718 A April 21, 2019, 12:37 p.m. OK Scala TESTS 36 436 0 1000
52980000 yakamoto A April 18, 2019, 5:15 p.m. OK Scala TESTS 36 452 0 1000
52966816 mrajesh A April 18, 2019, 4:03 p.m. OK Scala TESTS 36 514 0 1000

remove filters

Back to search problems