Codeforces Round 605 (Div. 3)

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
1272 Codeforces Round 605 (Div. 3) FINISHED False 7200 161281487 Dec. 12, 2019, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 27304 ) C Yet Another Broken Keyboard PROGRAMMING combinatorics dp implementation 1100

B'Recently, Norge found a string s = s_1 s_2 ldots s_n consisting of n lowercase Latin letters. As an exercise to improve his typing speed, he decided to type all substrings of the string s . Yes, all frac{n (n + 1)}{2} of them! A substring of s is a non-empty string x = s[a ldots b] = s_{a} s_{a + 1} ldots s_{b} ( 1 <= q a <= q b <= q n ). For example, "auto" and "ton" are substrings of "automaton". Shortly after the start of the exercise, Norge realized that his keyboard was broken, namely, he could use only k Latin letters c_1, c_2, ldots, c_k out of 26 . After that, Norge became interested in how many substrings of the string s he could still type using his broken keyboard. Help him to find this number. The first line contains two space-separated integers n and k ( 1 <= q n <= q 2 cdot 10^5 , 1 <= q k <= q 26 ) -- the length of the string s and the number of Latin letters still available on the keyboard. The second line contains the string s consisting of exactly n lowercase Latin letters. The third line contains k space-separated distinct lowercase Latin letters c_1, c_2, ldots, c_k -- the letters still available on the keyboard. Print a single number -- the number of substrings of s that can be typed using only available letters c_1, c_2, ldots, c_k . In the first example Norge can print substrings s[1 ldots2] , s[2 ldots3] , s[1 ldots3] , s[1 ldots1] , s[2 ldots2] , s[3 ldots3] , s[5 ldots6] , s[6 ldots7] , s[5 ldots7] , s[5 ldots5] , s[6 ldots6] , s[7 ldots7] . '...

Tutorials

Codeforces Round #605 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
66746629 gustavo_farani C Dec. 13, 2019, 2:59 a.m. OK Clang++17 Diagnostics TESTS 17 46 0 1100
68705775 J01435K C Jan. 13, 2020, 11:14 a.m. OK Clang++17 Diagnostics TESTS 17 93 15155200 1100
66807181 MBHuman C Dec. 13, 2019, 10:15 p.m. OK Clang++17 Diagnostics TESTS 17 249 15155200 1100
66814331 NF_Erturk C Dec. 14, 2019, 4:55 a.m. OK Clang++17 Diagnostics TESTS 17 280 15155200 1100
66727893 dlightny C Dec. 12, 2019, 4:35 p.m. OK FPC TESTS 17 31 614400 1100
67461338 harsha.pathuri C Dec. 23, 2019, 9:17 a.m. OK GNU C11 TESTS 17 30 204800 1100
68607636 shimul_duet C Jan. 11, 2020, 2:36 p.m. OK GNU C11 TESTS 17 31 204800 1100
68977488 zzqwtc C Jan. 17, 2020, 9:24 a.m. OK GNU C11 TESTS 17 31 204800 1100
69233787 vjudge1 C Jan. 21, 2020, 10:30 a.m. OK GNU C11 TESTS 17 31 204800 1100
69276447 vjudge1 C Jan. 22, 2020, 2:32 a.m. OK GNU C11 TESTS 17 31 204800 1100
67263532 TheGodofTVSeries C Dec. 20, 2019, 4:56 a.m. OK GNU C11 TESTS 17 31 204800 1100
67391224 ShuvoMalakar C Dec. 21, 2019, 7:51 p.m. OK GNU C11 TESTS 17 31 204800 1100
67681391 lishb C Dec. 27, 2019, 6:35 a.m. OK GNU C11 TESTS 17 31 204800 1100
68060742 yigezhe C Jan. 2, 2020, 3:39 a.m. OK GNU C11 TESTS 17 31 204800 1100
68441401 TARIQ C Jan. 9, 2020, 11:05 a.m. OK GNU C11 TESTS 17 31 204800 1100
66860398 hunxuewangzi C Dec. 14, 2019, 12:31 p.m. OK GNU C++11 TESTS 17 15 0 1100
67452906 ptrewige C Dec. 23, 2019, 5:23 a.m. OK GNU C++11 TESTS 17 15 204800 1100
66747140 vioalbert C Dec. 13, 2019, 3:26 a.m. OK GNU C++11 TESTS 17 15 512000 1100
66900241 vjudge1 C Dec. 15, 2019, 5:05 a.m. OK GNU C++11 TESTS 17 15 512000 1100
67180523 dejongh93 C Dec. 18, 2019, 10:33 p.m. OK GNU C++11 TESTS 17 15 2150400 1100
66865757 hunxuewangzi C Dec. 14, 2019, 12:53 p.m. OK GNU C++11 TESTS 17 30 0 1100
67199518 operaghost C Dec. 19, 2019, 10:25 a.m. OK GNU C++11 TESTS 17 30 204800 1100
69147132 vrsashly C Jan. 19, 2020, 4:21 p.m. OK GNU C++11 TESTS 17 30 204800 1100
67577555 wsnbb C Dec. 25, 2019, 3:47 a.m. OK GNU C++11 TESTS 17 30 204800 1100
67311154 kathy_ivy C Dec. 21, 2019, 2:55 a.m. OK GNU C++11 TESTS 17 30 204800 1100
68033125 dysnomia C Jan. 1, 2020, 10:29 a.m. OK GNU C++14 TESTS 17 15 204800 1100
68224308 silverwingsss C Jan. 5, 2020, 6:27 a.m. OK GNU C++14 TESTS 17 15 204800 1100
66837626 mrdperfect C Dec. 14, 2019, 11:17 a.m. OK GNU C++14 TESTS 17 15 204800 1100
66880941 Black_hat123 C Dec. 14, 2019, 4:32 p.m. OK GNU C++14 TESTS 17 15 204800 1100
66779506 lizzzzzzzzzz C Dec. 13, 2019, 11:26 a.m. OK GNU C++14 TESTS 17 15 307200 1100
68916543 lybzscyzb C Jan. 16, 2020, 8:35 a.m. OK GNU C++14 TESTS 17 15 512000 1100
69635688 Arshad12 C Jan. 27, 2020, 6:29 p.m. OK GNU C++14 TESTS 17 15 512000 1100
69548405 ashu12_chi C Jan. 26, 2020, 4:58 a.m. OK GNU C++14 TESTS 17 15 512000 1100
69178225 lane C Jan. 20, 2020, 8:58 a.m. OK GNU C++14 TESTS 17 15 512000 1100
69152314 arv77 C Jan. 19, 2020, 6:03 p.m. OK GNU C++14 TESTS 17 15 512000 1100
66809828 halohalo C Dec. 14, 2019, 1:19 a.m. OK GNU C++17 TESTS 17 15 204800 1100
66816844 lovecc C Dec. 14, 2019, 6:07 a.m. OK GNU C++17 TESTS 17 15 204800 1100
66820110 wenzhuan C Dec. 14, 2019, 7:10 a.m. OK GNU C++17 TESTS 17 15 204800 1100
67310146 wanghanjun233 C Dec. 21, 2019, 1:59 a.m. OK GNU C++17 TESTS 17 15 204800 1100
67500503 ZeroScar C Dec. 24, 2019, 4:12 a.m. OK GNU C++17 TESTS 17 15 204800 1100
67666041 Md_Al_Siam C Dec. 26, 2019, 5:54 p.m. OK GNU C++17 TESTS 17 15 204800 1100
68251175 nNguyeNn C Jan. 5, 2020, 2:21 p.m. OK GNU C++17 TESTS 17 15 204800 1100
68383132 gustavo_m32 C Jan. 8, 2020, 3:32 a.m. OK GNU C++17 TESTS 17 15 204800 1100
69726500 BrokenDreACM C Jan. 29, 2020, 12:26 p.m. OK GNU C++17 TESTS 17 15 204800 1100
69853201 bidirectionalprograming C Jan. 30, 2020, 4:14 p.m. OK GNU C++17 TESTS 17 15 204800 1100
67047970 sighduck C Dec. 17, 2019, 1:05 a.m. OK Go TESTS 17 46 0 1100
66894388 pain_nagato C Dec. 14, 2019, 11:43 p.m. OK Go TESTS 17 62 5222400 1100
66725156 porksteak C Dec. 12, 2019, 3:54 p.m. OK Go TESTS 17 608 0 1100
69651792 Linyxus C Jan. 28, 2020, 5:38 a.m. OK Haskell TESTS 17 62 2150400 1100
66802029 Laurens C Dec. 13, 2019, 7:06 p.m. OK Haskell TESTS 17 77 5324800 1100
69651802 vjudge1 C Jan. 28, 2020, 5:39 a.m. OK Haskell TESTS 17 93 2150400 1100
68012147 Clowyy C Dec. 31, 2019, 4:24 p.m. OK Java 11 TESTS 17 171 0 1100
68001101 Tarun27 C Dec. 31, 2019, 10:52 a.m. OK Java 11 TESTS 17 171 0 1100
67658557 adzi C Dec. 26, 2019, 2:50 p.m. OK Java 11 TESTS 17 171 0 1100
67406323 nithin_bharathi C Dec. 22, 2019, 6:32 a.m. OK Java 11 TESTS 17 171 0 1100
67406268 nithin_bharathi C Dec. 22, 2019, 6:31 a.m. OK Java 11 TESTS 17 171 0 1100
67478900 MaxHeap C Dec. 23, 2019, 3:19 p.m. OK Java 11 TESTS 17 186 0 1100
67070240 ankyy_0103 C Dec. 17, 2019, 12:30 p.m. OK Java 11 TESTS 17 186 0 1100
68359347 YahiaMostafa C Jan. 7, 2020, 1:28 p.m. OK Java 11 TESTS 17 187 0 1100
67244981 kiberKotleta2009 C Dec. 19, 2019, 5:01 p.m. OK Java 11 TESTS 17 187 0 1100
66992292 Anonymous C Dec. 15, 2019, 9:17 p.m. OK Java 11 TESTS 17 187 0 1100
67017026 procrastinate7 C Dec. 16, 2019, 11:47 a.m. OK Java 8 TESTS 17 108 0 1100
66809340 luchy0120 C Dec. 14, 2019, 12:49 a.m. OK Java 8 TESTS 17 108 0 1100
67453025 Java C Dec. 23, 2019, 5:27 a.m. OK Java 8 TESTS 17 109 0 1100
69298029 HU_Geek C Jan. 22, 2020, 12:54 p.m. OK Java 8 TESTS 17 109 0 1100
68592809 Modi_sarkar C Jan. 11, 2020, 1:10 p.m. OK Java 8 TESTS 17 109 0 1100
68160606 akshVerma C Jan. 4, 2020, 10:42 a.m. OK Java 8 TESTS 17 109 0 1100
67664169 NMouad21 C Dec. 26, 2019, 5:07 p.m. OK Java 8 TESTS 17 109 0 1100
67622974 still_the_big_bang C Dec. 25, 2019, 7:47 p.m. OK Java 8 TESTS 17 109 0 1100
67496605 gouh9qn C Dec. 23, 2019, 11:34 p.m. OK Java 8 TESTS 17 109 0 1100
67440473 sahiltakkar C Dec. 22, 2019, 7:02 p.m. OK Java 8 TESTS 17 109 0 1100
66789373 shenqi16 C Dec. 13, 2019, 2:45 p.m. OK Kotlin TESTS 17 140 0 1100
66791058 shenqi16 C Dec. 13, 2019, 3:18 p.m. OK Kotlin TESTS 17 155 204800 1100
66789262 shenqi16 C Dec. 13, 2019, 2:42 p.m. OK Kotlin TESTS 17 156 0 1100
67195851 hcmdgh C Dec. 19, 2019, 9 a.m. OK Kotlin TESTS 17 156 0 1100
66717798 ec24 C Dec. 12, 2019, 3:19 p.m. OK Kotlin TESTS 17 171 204800 1100
66746099 Spheniscine C Dec. 13, 2019, 2:24 a.m. OK Kotlin TESTS 17 171 204800 1100
68346945 sevimlikedicik C Jan. 7, 2020, 7:47 a.m. OK Mono C# TESTS 17 61 1126400 1100
66726389 alisondra C Dec. 12, 2019, 4:11 p.m. OK Mono C# TESTS 17 62 716800 1100
67197068 KhalidSultan C Dec. 19, 2019, 9:29 a.m. OK Mono C# TESTS 17 62 4710400 1100
66827832 _DAC_ C Dec. 14, 2019, 9:33 a.m. OK Mono C# TESTS 17 62 4710400 1100
66717516 Dock290 C Dec. 12, 2019, 3:18 p.m. OK Mono C# TESTS 17 77 921600 1100
67061488 Svenxx C Dec. 17, 2019, 9:16 a.m. OK Mono C# TESTS 17 77 4403200 1100
69556102 sakapon C Jan. 26, 2020, 8:52 a.m. OK Mono C# TESTS 17 77 8294400 1100
66777746 excellent123 C Dec. 13, 2019, 10:46 a.m. OK MS C++ TESTS 17 30 204800 1100
69298260 vjudge5 C Jan. 22, 2020, 12:59 p.m. OK MS C++ TESTS 17 30 1024000 1100
68775449 vjudge4 C Jan. 14, 2020, 1:17 p.m. OK MS C++ TESTS 17 30 2048000 1100
68905963 atrapastul C Jan. 16, 2020, 6:49 a.m. OK MS C++ TESTS 17 31 204800 1100
69049645 vjudge3 C Jan. 18, 2020, 12:14 p.m. OK MS C++ TESTS 17 31 204800 1100
69074871 vjudge3 C Jan. 19, 2020, 2:13 a.m. OK MS C++ TESTS 17 31 204800 1100
69075516 vjudge2 C Jan. 19, 2020, 2:44 a.m. OK MS C++ TESTS 17 31 204800 1100
69256067 seh631638554 C Jan. 21, 2020, 3:41 p.m. OK MS C++ TESTS 17 31 204800 1100
69834837 vjudge2 C Jan. 30, 2020, 11:31 a.m. OK MS C++ TESTS 17 31 204800 1100
68628715 vjudge3 C Jan. 12, 2020, 1:06 a.m. OK MS C++ TESTS 17 31 204800 1100
68977500 vjudge4 C Jan. 17, 2020, 9:24 a.m. OK MS C++ 2017 TESTS 17 15 204800 1100
67302392 Yomapeed C Dec. 20, 2019, 7:19 p.m. OK MS C++ 2017 TESTS 17 30 204800 1100
67069186 vjudge1 C Dec. 17, 2019, 12:11 p.m. OK MS C++ 2017 TESTS 17 30 614400 1100
66798633 Ferox C Dec. 13, 2019, 5:57 p.m. OK MS C++ 2017 TESTS 17 30 921600 1100
66774654 tomwang C Dec. 13, 2019, 9:27 a.m. OK MS C++ 2017 TESTS 17 31 204800 1100
69843541 chen123456 C Jan. 30, 2020, 1:47 p.m. OK MS C++ 2017 TESTS 17 31 204800 1100
69712715 vjudge3 C Jan. 29, 2020, 7:44 a.m. OK MS C++ 2017 TESTS 17 31 204800 1100
69028361 vjudge2 C Jan. 18, 2020, 7:38 a.m. OK MS C++ 2017 TESTS 17 31 204800 1100
66812073 cursed C Dec. 14, 2019, 3:25 a.m. OK MS C++ 2017 TESTS 17 31 204800 1100
66720277 vikas.pachisia C Dec. 12, 2019, 3:27 p.m. OK MS C++ 2017 TESTS 17 31 204800 1100
66803069 Tomasz43 C Dec. 13, 2019, 7:31 p.m. OK Node.js TESTS 17 171 6860800 1100
66727761 TitanRoyal C Dec. 12, 2019, 4:33 p.m. OK Node.js TESTS 17 202 10035200 1100
66729557 rsFalse C Dec. 12, 2019, 5:03 p.m. OK Perl TESTS 17 264 22732800 1100
68052003 mayakin C Jan. 1, 2020, 7:23 p.m. OK PHP TESTS 17 155 409600 1100
67566647 wolffd C Dec. 24, 2019, 7:38 p.m. OK PyPy 2 TESTS 17 124 921600 1100
66720682 a11b11c11 C Dec. 12, 2019, 3:28 p.m. OK PyPy 2 TESTS 17 124 921600 1100
66736433 11fingers C Dec. 12, 2019, 7:04 p.m. OK PyPy 2 TESTS 17 139 819200 1100
66747415 aaa_bbb_ccc C Dec. 13, 2019, 3:40 a.m. OK PyPy 2 TESTS 17 170 921600 1100
66792479 McYaraliSisman C Dec. 13, 2019, 3:47 p.m. OK PyPy 2 TESTS 17 186 4096000 1100
67429445 19n1900011773 C Dec. 22, 2019, 2:42 p.m. OK PyPy 3 TESTS 17 140 2457600 1100
69628797 shailendra_123 C Jan. 27, 2020, 4:36 p.m. OK PyPy 3 TESTS 17 155 2457600 1100
68664071 Mathematician2000 C Jan. 12, 2020, 2:32 p.m. OK PyPy 3 TESTS 17 155 2457600 1100
67689763 ss7890 C Dec. 27, 2019, 10:33 a.m. OK PyPy 3 TESTS 17 155 2457600 1100
67274367 somnath796 C Dec. 20, 2019, 9:36 a.m. OK PyPy 3 TESTS 17 155 2457600 1100
66791322 yiseboge C Dec. 13, 2019, 3:23 p.m. OK PyPy 3 TESTS 17 155 2457600 1100
68136543 xiema C Jan. 3, 2020, 7:13 p.m. OK PyPy 3 TESTS 17 155 2560000 1100
69269575 princebelkovetz C Jan. 21, 2020, 8:12 p.m. OK PyPy 3 TESTS 17 155 2560000 1100
68469725 mitribunskiy C Jan. 10, 2020, 12:03 a.m. OK PyPy 3 TESTS 17 155 2560000 1100
67261173 nealzane C Dec. 20, 2019, 3:34 a.m. OK PyPy 3 TESTS 17 155 2560000 1100
67941711 pengyuhe C Dec. 30, 2019, 1:42 a.m. OK Python 2 TESTS 17 249 2252800 1100
67065544 coder_VI C Dec. 17, 2019, 10:57 a.m. OK Python 2 TESTS 17 265 2662400 1100
67018778 Tverrrr C Dec. 16, 2019, 12:19 p.m. OK Python 3 TESTS 17 124 409600 1100
66717740 DisciplinedDragon C Dec. 12, 2019, 3:19 p.m. OK Python 3 TESTS 17 124 2252800 1100
67511870 ayushij2704 C Dec. 24, 2019, 9:27 a.m. OK Python 3 TESTS 17 124 2457600 1100
67326151 cs1g C Dec. 21, 2019, 9:50 a.m. OK Python 3 TESTS 17 124 2867200 1100
67250414 yoweiqing C Dec. 19, 2019, 6:51 p.m. OK Python 3 TESTS 17 139 409600 1100
68071365 parvezaalam786 C Jan. 2, 2020, 10:27 a.m. OK Python 3 TESTS 17 139 1024000 1100
66734791 Georgy.B C Dec. 12, 2019, 6:22 p.m. OK Python 3 TESTS 17 140 409600 1100
68123726 stars_in_the_sky C Jan. 3, 2020, 2:20 p.m. OK Python 3 TESTS 17 140 819200 1100
67070693 sherlock_of_code C Dec. 17, 2019, 12:40 p.m. OK Python 3 TESTS 17 140 819200 1100
67437745 vorzawk C Dec. 22, 2019, 5:55 p.m. OK Python 3 TESTS 17 140 1126400 1100
67007253 nemi_zzz C Dec. 16, 2019, 8:29 a.m. OK Ruby TESTS 17 312 409600 1100
66721716 abstract C Dec. 12, 2019, 3:31 p.m. OK Rust TESTS 17 46 716800 1100
66730813 sam.ninja C Dec. 12, 2019, 5:27 p.m. OK Scala TESTS 17 499 2150400 1100

remove filters

Back to search problems