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 |
---|---|---|---|---|---|---|
1555 | Educational Codeforces Round 112 (Rated for Div. 2) | FINISHED | False | 7200 | 109524263 | July 30, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 12784 ) | D | Say No to Palindromes | PROGRAMMING | brute force dp strings | 1600 |
B"Let's call the string beautiful if it does not contain a substring of length at least 2 , which is a palindrome. Recall that a palindrome is a string that reads the same way from the first character to the last and from the last character to the first. For example, the strings a, bab, acca, bcabcbacb are palindromes, but the strings ab, abbbaa, cccb are not. Let's define cost of a string as the minimum number of operations so that the string becomes beautiful, if in one operation it is allowed to change any character of the string to one of the first 3 letters of the Latin alphabet (in lowercase). You are given a string s of length n , each character of the string is one of the first 3 letters of the Latin alphabet (in lowercase). You have to answer m queries -- calculate the cost of the substring of the string s from l_i -th to r_i -th position, inclusive. The first line contains two integers n and m ( 1 <= n, m <= 2 cdot 10^5 ) -- the length of the string s and the number of queries. The second line contains the string s , it consists of n characters, each character one of the first 3 Latin letters. The following m lines contain two integers l_i and r_i ( 1 <= l_i <= r_i <= n ) -- parameters of the i -th query. For each query, print a single integer -- the cost of the substring of the string s from l_i -th to r_i -th position, inclusive. Consider the queries of the example test. "... |
93389 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
124364467 | gxlois | D | July 30, 2021, 8:18 p.m. | OK | D | TESTS | 15 | 249 | 18227200 | 1600 | |
124365312 | eastnman | D | July 30, 2021, 8:30 p.m. | OK | Delphi | TESTS | 15 | 234 | 17510400 | 1600 | |
124341591 | Joe2357 | D | July 30, 2021, 4:33 p.m. | OK | GNU C11 | TESTS | 15 | 826 | 8704000 | 1600 | |
124377629 | dingdingsb | D | July 31, 2021, 2:14 a.m. | OK | GNU C++11 | TESTS | 15 | 62 | 9932800 | 1600 | |
124377354 | uuku | D | July 31, 2021, 2:08 a.m. | OK | GNU C++11 | TESTS | 15 | 62 | 15564800 | 1600 | |
124377975 | zqyyy | D | July 31, 2021, 2:21 a.m. | OK | GNU C++11 | TESTS | 15 | 78 | 9728000 | 1600 | |
124351210 | asdf1229 | D | July 30, 2021, 5:34 p.m. | OK | GNU C++11 | TESTS | 15 | 78 | 12083200 | 1600 | |
124345925 | ORzyzRO | D | July 30, 2021, 4:51 p.m. | OK | GNU C++11 | TESTS | 15 | 78 | 15360000 | 1600 | |
124375506 | L.I. | D | July 31, 2021, 1:24 a.m. | OK | GNU C++11 | TESTS | 15 | 93 | 11161600 | 1600 | |
124380235 | Eason_AC | D | July 31, 2021, 3:06 a.m. | OK | GNU C++11 | TESTS | 15 | 93 | 11366400 | 1600 | |
124385937 | mao_zx | D | July 31, 2021, 4:46 a.m. | OK | GNU C++11 | TESTS | 15 | 93 | 12083200 | 1600 | |
124344171 | yyyz04 | D | July 30, 2021, 4:41 p.m. | OK | GNU C++11 | TESTS | 15 | 93 | 28979200 | 1600 | |
124375665 | L.I. | D | July 31, 2021, 1:28 a.m. | OK | GNU C++11 | TESTS | 15 | 108 | 10956800 | 1600 | |
124370490 | quadraticreciprocity | D | July 30, 2021, 10:22 p.m. | OK | GNU C++14 | TESTS | 15 | 155 | 8704000 | 1600 | |
124363177 | sami7786 | D | July 30, 2021, 8 p.m. | OK | GNU C++14 | TESTS | 15 | 155 | 9113600 | 1600 | |
124338993 | lazywitt | D | July 30, 2021, 4:27 p.m. | OK | GNU C++14 | TESTS | 15 | 155 | 9216000 | 1600 | |
124378130 | G_liver | D | July 31, 2021, 2:25 a.m. | OK | GNU C++14 | TESTS | 15 | 155 | 9523200 | 1600 | |
124373274 | chuiniu | D | July 31, 2021, 12:07 a.m. | OK | GNU C++14 | TESTS | 15 | 156 | 6348800 | 1600 | |
124344847 | Praveen1208 | D | July 30, 2021, 4:44 p.m. | OK | GNU C++14 | TESTS | 15 | 156 | 11776000 | 1600 | |
124340018 | ahmedalaa756.aa | D | July 30, 2021, 4:29 p.m. | OK | GNU C++14 | TESTS | 15 | 170 | 9113600 | 1600 | |
124370788 | shaky_adino | D | July 30, 2021, 10:32 p.m. | OK | GNU C++14 | TESTS | 15 | 170 | 12697600 | 1600 | |
124385585 | Atland | D | July 31, 2021, 4:41 a.m. | OK | GNU C++14 | TESTS | 15 | 170 | 19148800 | 1600 | |
124341259 | deadshooter_v2 | D | July 30, 2021, 4:32 p.m. | OK | GNU C++14 | TESTS | 15 | 171 | 9011200 | 1600 | |
124359284 | Patrusheva_Anna | D | July 30, 2021, 7:10 p.m. | OK | GNU C++17 | TESTS | 15 | 139 | 30310400 | 1600 | |
124353361 | spy20051623 | D | July 30, 2021, 5:58 p.m. | OK | GNU C++17 | TESTS | 15 | 140 | 8704000 | 1600 | |
124375595 | Cx330_L | D | July 31, 2021, 1:27 a.m. | OK | GNU C++17 | TESTS | 15 | 140 | 8806400 | 1600 | |
124357449 | soy4742 | D | July 30, 2021, 6:45 p.m. | OK | GNU C++17 | TESTS | 15 | 140 | 8806400 | 1600 | |
124347612 | Asphyxia_ | D | July 30, 2021, 5:02 p.m. | OK | GNU C++17 | TESTS | 15 | 140 | 11980800 | 1600 | |
124349491 | Mastre | D | July 30, 2021, 5:17 p.m. | OK | GNU C++17 | TESTS | 15 | 155 | 7782400 | 1600 | |
124385829 | codycjy | D | July 31, 2021, 4:44 a.m. | OK | GNU C++17 | TESTS | 15 | 155 | 8704000 | 1600 | |
124379766 | Muphy | D | July 31, 2021, 2:56 a.m. | OK | GNU C++17 | TESTS | 15 | 155 | 8704000 | 1600 | |
124346523 | Bull_Demon | D | July 30, 2021, 4:54 p.m. | OK | GNU C++17 | TESTS | 15 | 155 | 8704000 | 1600 | |
124380731 | liaoshixing | D | July 31, 2021, 3:14 a.m. | OK | GNU C++17 | TESTS | 15 | 155 | 8806400 | 1600 | |
124339124 | Saarthak_10 | D | July 30, 2021, 4:28 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 109 | 8294400 | 1600 | |
124368898 | Timer_011 | D | July 30, 2021, 9:36 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 109 | 9625600 | 1600 | |
124368388 | hritik3878 | D | July 30, 2021, 9:25 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 109 | 9625600 | 1600 | |
124348989 | TimeWarp101 | D | July 30, 2021, 5:13 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 109 | 11673600 | 1600 | |
124340075 | TAoz1 | D | July 30, 2021, 4:30 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 109 | 12288000 | 1600 | |
124379369 | DreamingLeaf | D | July 31, 2021, 2:49 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 124 | 9625600 | 1600 | |
124373890 | DuyAnhTM | D | July 31, 2021, 12:29 a.m. | OK | GNU C++17 (64) | TESTS | 15 | 124 | 9625600 | 1600 | |
124371962 | narangkay | D | July 30, 2021, 11:15 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 124 | 9625600 | 1600 | |
124369106 | Timer_011 | D | July 30, 2021, 9:42 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 124 | 9625600 | 1600 | |
124369069 | Timer_011 | D | July 30, 2021, 9:41 p.m. | OK | GNU C++17 (64) | TESTS | 15 | 124 | 9625600 | 1600 | |
124345030 | BestEveryman | D | July 30, 2021, 4:45 p.m. | OK | Java 11 | TESTS | 15 | 343 | 44748800 | 1600 | |
124361277 | kareem3id | D | July 30, 2021, 7:35 p.m. | OK | Java 11 | TESTS | 15 | 358 | 29081600 | 1600 | |
124340617 | BiggEr. | D | July 30, 2021, 4:31 p.m. | OK | Java 11 | TESTS | 15 | 358 | 29900800 | 1600 | |
124373109 | Andwerp | D | July 31, 2021, 12:02 a.m. | OK | Java 11 | TESTS | 15 | 374 | 38195200 | 1600 | |
124386447 | yogii_123 | D | July 31, 2021, 4:54 a.m. | OK | Java 11 | TESTS | 15 | 389 | 30105600 | 1600 | |
124368232 | mrRobot | D | July 30, 2021, 9:22 p.m. | OK | Java 11 | TESTS | 15 | 390 | 38604800 | 1600 | |
124374565 | mphillotry | D | July 31, 2021, 12:55 a.m. | OK | Java 11 | TESTS | 15 | 421 | 41676800 | 1600 | |
124345660 | LiandrysAnguish | D | July 30, 2021, 4:49 p.m. | OK | Java 11 | TESTS | 15 | 436 | 44441600 | 1600 | |
124366953 | _Body | D | July 30, 2021, 8:57 p.m. | OK | Java 11 | TESTS | 15 | 451 | 43417600 | 1600 | |
124340784 | Adi_7861 | D | July 30, 2021, 4:31 p.m. | OK | Java 11 | TESTS | 15 | 468 | 29900800 | 1600 | |
124356520 | nuni. | D | July 30, 2021, 6:33 p.m. | OK | Java 8 | TESTS | 15 | 233 | 28569600 | 1600 | |
124356493 | nuni. | D | July 30, 2021, 6:33 p.m. | OK | Java 8 | TESTS | 15 | 233 | 28569600 | 1600 | |
124356339 | nuni. | D | July 30, 2021, 6:31 p.m. | OK | Java 8 | TESTS | 15 | 249 | 28467200 | 1600 | |
124367475 | kkkkush | D | July 30, 2021, 9:06 p.m. | OK | Java 8 | TESTS | 15 | 265 | 27750400 | 1600 | |
124389541 | priyam_anand | D | July 31, 2021, 5:39 a.m. | OK | Java 8 | TESTS | 15 | 280 | 27750400 | 1600 | |
124343968 | SlowLegendaryNoobMaster | D | July 30, 2021, 4:40 p.m. | OK | Java 8 | TESTS | 15 | 280 | 38400000 | 1600 | |
124355773 | TheKingInTheNorth | D | July 30, 2021, 6:24 p.m. | OK | Java 8 | TESTS | 15 | 327 | 25907200 | 1600 | |
124356182 | aditya_daredevil | D | July 30, 2021, 6:29 p.m. | OK | Java 8 | TESTS | 15 | 358 | 25804800 | 1600 | |
124362356 | BrayBray123 | D | July 30, 2021, 7:49 p.m. | OK | Java 8 | TESTS | 15 | 1435 | 20480000 | 1600 | |
124356921 | pras7946 | D | July 30, 2021, 6:38 p.m. | OK | Java 8 | TESTS | 15 | 1481 | 28057600 | 1600 | |
124339469 | Huth-0 | D | July 30, 2021, 4:28 p.m. | OK | Kotlin | TESTS | 15 | 1684 | 21913600 | 1600 | |
124375976 | zhangpangpang | D | July 31, 2021, 1:37 a.m. | OK | MS C++ 2017 | TESTS | 15 | 186 | 10956800 | 1600 | |
124339024 | icecomet | D | July 30, 2021, 4:27 p.m. | OK | MS C++ 2017 | TESTS | 15 | 187 | 44851200 | 1600 | |
124380136 | swz | D | July 31, 2021, 3:04 a.m. | OK | MS C++ 2017 | TESTS | 15 | 452 | 9011200 | 1600 | |
124360614 | adasanvin12345 | D | July 30, 2021, 7:27 p.m. | OK | MS C++ 2017 | TESTS | 15 | 1092 | 15462400 | 1600 | |
124342558 | people_plus_plus | D | July 30, 2021, 4:34 p.m. | OK | MS C++ 2017 | TESTS | 15 | 1138 | 24166400 | 1600 | |
124339459 | WoodMachine | D | July 30, 2021, 4:28 p.m. | OK | MS C++ 2017 | TESTS | 15 | 1590 | 20480000 | 1600 | |
124346273 | terry_u16 | D | July 30, 2021, 4:53 p.m. | OK | .NET Core C# | TESTS | 15 | 186 | 21708800 | 1600 | |
124341004 | Jirens_dad | D | July 30, 2021, 4:32 p.m. | OK | PyPy 2 | TESTS | 15 | 1887 | 47001600 | 1600 | |
124368277 | lebron87 | D | July 30, 2021, 9:23 p.m. | OK | PyPy 3 | TESTS | 15 | 343 | 35123200 | 1600 | |
124367989 | hritik3878 | D | July 30, 2021, 9:17 p.m. | OK | PyPy 3 | TESTS | 15 | 358 | 35123200 | 1600 | |
124364574 | Het_Fadia | D | July 30, 2021, 8:19 p.m. | OK | PyPy 3 | TESTS | 15 | 358 | 38912000 | 1600 | |
124366048 | Het_Fadia | D | July 30, 2021, 8:42 p.m. | OK | PyPy 3 | TESTS | 15 | 390 | 39014400 | 1600 | |
124364818 | Het_Fadia | D | July 30, 2021, 8:23 p.m. | OK | PyPy 3 | TESTS | 15 | 404 | 36864000 | 1600 | |
124367038 | Het_Fadia | D | July 30, 2021, 8:58 p.m. | OK | PyPy 3 | TESTS | 15 | 405 | 38912000 | 1600 | |
124364758 | Het_Fadia | D | July 30, 2021, 8:22 p.m. | OK | PyPy 3 | TESTS | 15 | 420 | 36864000 | 1600 | |
124365415 | Het_Fadia | D | July 30, 2021, 8:31 p.m. | OK | PyPy 3 | TESTS | 15 | 436 | 38912000 | 1600 | |
124377473 | bjy | D | July 31, 2021, 2:10 a.m. | OK | PyPy 3 | TESTS | 15 | 468 | 53350400 | 1600 | |
124368452 | lebron87 | D | July 30, 2021, 9:26 p.m. | OK | PyPy 3 | TESTS | 15 | 483 | 48537600 | 1600 | |
124349675 | NS3081992 | D | July 30, 2021, 5:19 p.m. | OK | Python 3 | TESTS | 15 | 1419 | 32358400 | 1600 | |
124350837 | NS3081992 | D | July 30, 2021, 5:30 p.m. | OK | Python 3 | TESTS | 15 | 1747 | 33894400 | 1600 | |
124353390 | NS3081992 | D | July 30, 2021, 5:58 p.m. | OK | Python 3 | TESTS | 15 | 1996 | 33075200 | 1600 | |
124338908 | ttim | D | July 30, 2021, 4:27 p.m. | OK | Scala | TESTS | 15 | 1653 | 64819200 | 1600 |
Back to search problems