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 |
---|---|---|---|---|---|---|
1504 | Codeforces Round 712 (Div. 2) | FINISHED | False | 8100 | 119719463 | April 3, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 21881 ) | A | Déjà Vu | PROGRAMMING | constructive algorithms strings | 800 |
B'A palindrome is a string that reads the same backward as forward. For example, the strings "z", "aaa", "aba", and "abccba" are palindromes, but "codeforces" and "ab" are not. You hate palindromes because they give you d xc3 xa9j xc3 xa0 vu. There is a string s . You must insert exactly one character 'a ' somewhere in s . If it is possible to create a string that is not a palindrome, you should find one example. Otherwise, you should report that it is impossible. For example, suppose s= "cbabc". By inserting an 'a ', you can create "acbabc", "cababc", "cbaabc", "cbabac", or "cbabca". However "cbaabc" is a palindrome, so you must output one of the other options. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The only line of each test case contains a string s consisting of lowercase English letters. The total length of all strings does not exceed 3 cdot 10^5 . For each test case, if there is no solution, output "NO". Otherwise, output "YES" followed by your constructed string of length |s|+1 on the next line. If there are multiple solutions, you may print any. You can print each letter of "YES" and "NO" in any case (upper or lower). The first test case is described in the statement. In the second test case, we can make either "aab" or "aba". But "aba" is a palindrome, so "aab" is the only correct answer. In the third test case, "zaza" and "zzaa" are correct answers, but not "azza". In the fourth test case, "baa" is the only correct answer. In the fifth test case, we can only make "aa", which is a palindrome. So the answer is "NO". In the sixth test case, "anutforajaroftuna" is a palindrome, but inserting 'a ' elsewhere is valid. '... |
Codeforces Round #712 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
111959842 | luminousdeer | A | April 4, 2021, 2:06 a.m. | OK | GNU C11 | TESTS | 33 | 93 | 614400 | 800 | |
111942986 | old_soul | A | April 3, 2021, 6:08 p.m. | OK | GNU C11 | TESTS | 33 | 109 | 307200 | 800 | |
111962878 | nishant_89 | A | April 4, 2021, 3:34 a.m. | OK | GNU C11 | TESTS | 33 | 109 | 921600 | 800 | |
111964243 | MVG_27 | A | April 4, 2021, 4:06 a.m. | OK | GNU C11 | TESTS | 33 | 499 | 307200 | 800 | |
111957653 | luogu_bot5 | A | April 4, 2021, 12:30 a.m. | OK | GNU C++11 | TESTS | 33 | 30 | 102400 | 800 | |
111965177 | feicheng_ | A | April 4, 2021, 4:33 a.m. | OK | GNU C++11 | TESTS | 33 | 30 | 4505600 | 800 | |
111942374 | Darko1227 | A | April 3, 2021, 6:02 p.m. | OK | GNU C++11 | TESTS | 33 | 31 | 102400 | 800 | |
111958758 | R7012S | A | April 4, 2021, 1:23 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 307200 | 800 | |
111958499 | rui_er | A | April 4, 2021, 1:11 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 307200 | 800 | |
111958188 | Daniel_Jiang | A | April 4, 2021, 12:58 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 307200 | 800 | |
111959245 | invaded | A | April 4, 2021, 1:46 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 307200 | 800 | |
111959891 | fishcathu. | A | April 4, 2021, 2:07 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 307200 | 800 | |
111962421 | BlankAoz | A | April 4, 2021, 3:23 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 307200 | 800 | |
111969547 | Pe.Ph | A | April 4, 2021, 5:58 a.m. | OK | GNU C++11 | TESTS | 33 | 31 | 307200 | 800 | |
111959778 | Myzc | A | April 4, 2021, 2:04 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 307200 | 800 | |
111961207 | AdityaPandey | A | April 4, 2021, 2:49 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 1024000 | 800 | |
111960428 | I_francis | A | April 4, 2021, 2:27 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 1024000 | 800 | |
111957949 | diegoZarate | A | April 4, 2021, 12:44 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 1024000 | 800 | |
111957144 | KKRpro | A | April 4, 2021, 12:02 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 1024000 | 800 | |
111950447 | Genedy97 | A | April 3, 2021, 8:13 p.m. | OK | GNU C++14 | TESTS | 33 | 31 | 1024000 | 800 | |
111961779 | Newplayers12 | A | April 4, 2021, 3:05 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 1024000 | 800 | |
111965559 | kk2_agnihotri | A | April 4, 2021, 4:44 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 1024000 | 800 | |
111965369 | challenger_hardik_08 | A | April 4, 2021, 4:40 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 1024000 | 800 | |
111962243 | toshant_n | A | April 4, 2021, 3:18 a.m. | OK | GNU C++14 | TESTS | 33 | 31 | 1024000 | 800 | |
111960354 | codrac | A | April 4, 2021, 2:24 a.m. | OK | GNU C++17 | TESTS | 33 | 30 | 1945600 | 800 | |
111961750 | lijiatu | A | April 4, 2021, 3:05 a.m. | OK | GNU C++17 | TESTS | 33 | 31 | 307200 | 800 | |
111961734 | shssip__zsy | A | April 4, 2021, 3:04 a.m. | OK | GNU C++17 | TESTS | 33 | 31 | 307200 | 800 | |
111940475 | cakewalk_nahi_hota | A | April 3, 2021, 5:45 p.m. | OK | GNU C++17 | TESTS | 33 | 31 | 307200 | 800 | |
111968806 | rheallyc | A | April 4, 2021, 5:47 a.m. | OK | GNU C++17 | TESTS | 33 | 31 | 614400 | 800 | |
111969978 | th_rahulthorat | A | April 4, 2021, 6:04 a.m. | OK | GNU C++17 | TESTS | 33 | 31 | 1024000 | 800 | |
111967943 | bhawesh7 | A | April 4, 2021, 5:33 a.m. | OK | GNU C++17 | TESTS | 33 | 31 | 1024000 | 800 | |
111968630 | _Shanto | A | April 4, 2021, 5:44 a.m. | OK | GNU C++17 | TESTS | 33 | 31 | 1024000 | 800 | |
111968730 | akshat_coder12 | A | April 4, 2021, 5:46 a.m. | OK | GNU C++17 | TESTS | 33 | 31 | 1024000 | 800 | |
111969070 | GotuZeno | A | April 4, 2021, 5:51 a.m. | OK | GNU C++17 | TESTS | 33 | 31 | 1024000 | 800 | |
111928356 | prashant__ranjan | A | April 3, 2021, 4:24 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 15 | 1024000 | 800 | |
111945750 | DARK49 | A | April 3, 2021, 6:41 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 30 | 1945600 | 800 | |
111969553 | alif_cse_ju | A | April 4, 2021, 5:58 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 31 | 307200 | 800 | |
111927625 | cright | A | April 3, 2021, 4:22 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 31 | 307200 | 800 | |
111950363 | ecnerwala | A | April 3, 2021, 8:11 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 31 | 1024000 | 800 | |
111968069 | arnold27 | A | April 4, 2021, 5:35 a.m. | OK | GNU C++17 (64) | TESTS | 33 | 31 | 1024000 | 800 | |
111956382 | over_flow | A | April 3, 2021, 11:24 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 31 | 1024000 | 800 | |
111952547 | praveenojha33 | A | April 3, 2021, 9:05 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 31 | 1024000 | 800 | |
111952413 | Protik_7 | A | April 3, 2021, 9:01 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 31 | 1024000 | 800 | |
111952255 | mohammad_reza | A | April 3, 2021, 8:57 p.m. | OK | GNU C++17 (64) | TESTS | 33 | 31 | 1024000 | 800 | |
111954133 | fc-lib-xyz | A | April 3, 2021, 9:51 p.m. | OK | Go | TESTS | 33 | 31 | 409600 | 800 | |
111942416 | codelegend | A | April 3, 2021, 6:02 p.m. | OK | Haskell | TESTS | 33 | 109 | 11571200 | 800 | |
111952068 | bittubittu | A | April 3, 2021, 8:52 p.m. | OK | Java 11 | TESTS | 33 | 187 | 0 | 800 | |
111942018 | ivanshubin | A | April 3, 2021, 5:58 p.m. | OK | Java 11 | TESTS | 33 | 187 | 0 | 800 | |
111941612 | RuthlessAggression | A | April 3, 2021, 5:55 p.m. | OK | Java 11 | TESTS | 33 | 187 | 0 | 800 | |
111965543 | monster1305 | A | April 4, 2021, 4:43 a.m. | OK | Java 11 | TESTS | 33 | 218 | 0 | 800 | |
111970016 | Sanju_250406 | A | April 4, 2021, 6:04 a.m. | OK | Java 11 | TESTS | 33 | 218 | 0 | 800 | |
111951607 | _merlin_ | A | April 3, 2021, 8:39 p.m. | OK | Java 11 | TESTS | 33 | 218 | 0 | 800 | |
111943340 | HastaLaVistaLa | A | April 3, 2021, 6:12 p.m. | OK | Java 11 | TESTS | 33 | 218 | 0 | 800 | |
111941216 | aquarius_gaurav | A | April 3, 2021, 5:51 p.m. | OK | Java 11 | TESTS | 33 | 218 | 0 | 800 | |
111939386 | anubhav44044 | A | April 3, 2021, 5:39 p.m. | OK | Java 11 | TESTS | 33 | 218 | 0 | 800 | |
111950118 | teenGraph | A | April 3, 2021, 8:06 p.m. | OK | Java 11 | TESTS | 33 | 233 | 0 | 800 | |
111956765 | PRIYANSH_TOMAR | A | April 3, 2021, 11:44 p.m. | OK | Java 8 | TESTS | 33 | 124 | 0 | 800 | |
111953363 | dynamo_001 | A | April 3, 2021, 9:26 p.m. | OK | Java 8 | TESTS | 33 | 124 | 0 | 800 | |
111940375 | gssakash | A | April 3, 2021, 5:45 p.m. | OK | Java 8 | TESTS | 33 | 124 | 0 | 800 | |
111944574 | InANutshell | A | April 3, 2021, 6:27 p.m. | OK | Java 8 | TESTS | 33 | 139 | 0 | 800 | |
111954866 | RonWonWon | A | April 3, 2021, 10:16 p.m. | OK | Java 8 | TESTS | 33 | 140 | 0 | 800 | |
111950032 | Dstoical | A | April 3, 2021, 8:04 p.m. | OK | Java 8 | TESTS | 33 | 140 | 0 | 800 | |
111967508 | toufique_husein | A | April 4, 2021, 5:25 a.m. | OK | Java 8 | TESTS | 33 | 171 | 0 | 800 | |
111942279 | KeshavAgarwal007 | A | April 3, 2021, 6:01 p.m. | OK | Java 8 | TESTS | 33 | 186 | 0 | 800 | |
111943028 | narayan.xrd | A | April 3, 2021, 6:09 p.m. | OK | Java 8 | TESTS | 33 | 187 | 0 | 800 | |
111939983 | amit_roy | A | April 3, 2021, 5:42 p.m. | OK | Java 8 | TESTS | 33 | 202 | 0 | 800 | |
111960603 | Ankar_kumar_saha | A | April 4, 2021, 2:32 a.m. | OK | JavaScript | TESTS | 33 | 124 | 12288000 | 800 | |
111968905 | zgw | A | April 4, 2021, 5:49 a.m. | OK | Kotlin | TESTS | 33 | 280 | 0 | 800 | |
111947279 | felix_vetsper | A | April 3, 2021, 7:04 p.m. | OK | Kotlin | TESTS | 33 | 295 | 0 | 800 | |
111964420 | e_ve | A | April 4, 2021, 4:10 a.m. | OK | MS C++ 2017 | TESTS | 33 | 46 | 1228800 | 800 | |
111950601 | mnrmustafa | A | April 3, 2021, 8:16 p.m. | OK | MS C++ 2017 | TESTS | 33 | 46 | 1228800 | 800 | |
111962617 | dingzhao777 | A | April 4, 2021, 3:28 a.m. | OK | MS C++ 2017 | TESTS | 33 | 62 | 512000 | 800 | |
111943699 | ArturoDiazZamudio | A | April 3, 2021, 6:16 p.m. | OK | MS C++ 2017 | TESTS | 33 | 77 | 1228800 | 800 | |
111968637 | Albertplus007 | A | April 4, 2021, 5:44 a.m. | OK | MS C++ 2017 | TESTS | 33 | 93 | 921600 | 800 | |
111962748 | Bulysky | A | April 4, 2021, 3:30 a.m. | OK | MS C++ 2017 | TESTS | 33 | 93 | 1126400 | 800 | |
111939808 | ustaritz | A | April 3, 2021, 5:41 p.m. | OK | MS C++ 2017 | TESTS | 33 | 93 | 1228800 | 800 | |
111932417 | khedia | A | April 3, 2021, 4:36 p.m. | OK | MS C++ 2017 | TESTS | 33 | 93 | 1228800 | 800 | |
111933535 | zkxshg | A | April 3, 2021, 4:39 p.m. | OK | MS C++ 2017 | TESTS | 33 | 93 | 1536000 | 800 | |
111962042 | XieJiaXuan | A | April 4, 2021, 3:12 a.m. | OK | MS C++ 2017 | TESTS | 33 | 108 | 921600 | 800 | |
111954725 | KibRia_BRUR_12 | A | April 3, 2021, 10:12 p.m. | OK | Node.js | TESTS | 33 | 311 | 20480000 | 800 | |
111944171 | beethoven97 | A | April 3, 2021, 6:22 p.m. | OK | PyPy 2 | TESTS | 33 | 233 | 11980800 | 800 | |
111954711 | pk31299 | A | April 3, 2021, 10:11 p.m. | OK | PyPy 3 | TESTS | 33 | 155 | 5427200 | 800 | |
111944962 | FlakeLCR | A | April 3, 2021, 6:31 p.m. | OK | PyPy 3 | TESTS | 33 | 171 | 6144000 | 800 | |
111944542 | Kelin | A | April 3, 2021, 6:26 p.m. | OK | PyPy 3 | TESTS | 33 | 171 | 7577600 | 800 | |
111942496 | codecunt7 | A | April 3, 2021, 6:03 p.m. | OK | PyPy 3 | TESTS | 33 | 171 | 7577600 | 800 | |
111967344 | halrybhalodia17 | A | April 4, 2021, 5:22 a.m. | OK | PyPy 3 | TESTS | 33 | 187 | 7987200 | 800 | |
111942685 | ksd_3 | A | April 3, 2021, 6:05 p.m. | OK | PyPy 3 | TESTS | 33 | 187 | 8396800 | 800 | |
111962924 | SaiPranav | A | April 4, 2021, 3:35 a.m. | OK | PyPy 3 | TESTS | 33 | 202 | 7782400 | 800 | |
111942217 | Kelin | A | April 3, 2021, 6 p.m. | OK | PyPy 3 | TESTS | 33 | 202 | 7884800 | 800 | |
111968199 | Leggasick | A | April 4, 2021, 5:37 a.m. | OK | PyPy 3 | TESTS | 33 | 202 | 8294400 | 800 | |
111945123 | SPD_9X2 | A | April 3, 2021, 6:33 p.m. | OK | PyPy 3 | TESTS | 33 | 202 | 8499200 | 800 | |
111946225 | skyscraper-60 | A | April 3, 2021, 6:47 p.m. | OK | Python 3 | TESTS | 33 | 93 | 1536000 | 800 | |
111968755 | DarkHeart861 | A | April 4, 2021, 5:46 a.m. | OK | Python 3 | TESTS | 33 | 93 | 1843200 | 800 | |
111958006 | Genius3435 | A | April 4, 2021, 12:47 a.m. | OK | Python 3 | TESTS | 33 | 93 | 1843200 | 800 | |
111962295 | eugalt | A | April 4, 2021, 3:19 a.m. | OK | Python 3 | TESTS | 33 | 93 | 2048000 | 800 | |
111963219 | eugalt | A | April 4, 2021, 3:42 a.m. | OK | Python 3 | TESTS | 33 | 108 | 2150400 | 800 | |
111962850 | eugalt | A | April 4, 2021, 3:33 a.m. | OK | Python 3 | TESTS | 33 | 108 | 2150400 | 800 | |
111962509 | eugalt | A | April 4, 2021, 3:25 a.m. | OK | Python 3 | TESTS | 33 | 109 | 1945600 | 800 | |
111962054 | eugalt | A | April 4, 2021, 3:12 a.m. | OK | Python 3 | TESTS | 33 | 109 | 1945600 | 800 | |
111945785 | deepansh09 | A | April 3, 2021, 6:42 p.m. | OK | Python 3 | TESTS | 33 | 109 | 1945600 | 800 | |
111931931 | agw02010 | A | April 3, 2021, 4:34 p.m. | OK | Python 3 | TESTS | 33 | 124 | 1740800 | 800 |
Back to search problems