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 |
---|---|---|---|---|---|---|
1951 | Codeforces Global Round 25 | FINISHED | False | 10800 | 24765863 | April 6, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3758 ) | E | No Palindromes | PROGRAMMING | brute force constructive algorithms greedy hashing implementation strings |
B'You are given a string s consisting of lowercase Latin characters. You need to partition ^ dagger this string into some substrings, such that each substring is not a palindrome ^ ddagger . ^ dagger A partition of a string s is an ordered sequence of some k strings t_1, t_2, ldots, t_k , such that t_1 + t_2 + ldots + t_k = s , where + here represents the concatenation operation. ^ ddagger A string s is considered a palindrome if it reads the same backwards as forwards. For example, mathtt{racecar} , mathtt{abccba} , and mathtt{a} are palindromes, but mathtt{ab} , mathtt{dokibird} , and mathtt{kurosanji} are not. Each test contains multiple test cases. The first line contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Each test case contains a string s consisting of lowercase Latin characters ( 1 <= |s| <= 10^6 ). It is guaranteed that the sum of |s| over all test cases does not exceed 10^6 . For each test case, print on one line "YES" if there exists a partition of s whose parts are not palindromes, or "NO" if there is no such partition. If the answer is "YES", on the second line, print an integer k -- the number of parts that s needs to be partitioned to such that each part is not a palindrome. On the third line, print k strings t_1, t_2, ldots, t_k representing such a partition. If there are multiple such partitions, print any of them. In the first test case, since mathtt{sinktheyacht} is already non-palindrome, the partition [ mathtt{sinktheyacht}] is valid. In the second test case, as any substring of the string s is palindrome, there are no valid partitions. In the third test case, another valid partition is [ mathtt{uw}, mathtt{uo}, mathtt{wou}, mathtt{wu}] . '... |
Codeforces Global Round 25 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
255407751 | t1r3d_ | E | April 7, 2024, 3:28 a.m. | OK | C++14 (GCC 6-32) | TESTS | 52 | 62 | 5324800 | ||
255403561 | TrendBattles | E | April 7, 2024, 2:20 a.m. | OK | C++14 (GCC 6-32) | TESTS | 52 | 77 | 102400 | ||
255407975 | wxt1221 | E | April 7, 2024, 3:31 a.m. | OK | C++14 (GCC 6-32) | TESTS | 52 | 77 | 1126400 | ||
255377227 | Fuad37 | E | April 6, 2024, 8:02 p.m. | OK | C++14 (GCC 6-32) | TESTS | 52 | 93 | 102400 | ||
255406384 | Heshu | E | April 7, 2024, 3:06 a.m. | OK | C++14 (GCC 6-32) | TESTS | 52 | 93 | 32153600 | ||
255359483 | MaddyBeltran | E | April 6, 2024, 5:33 p.m. | OK | C++14 (GCC 6-32) | TESTS | 48 | 109 | 8089600 | ||
255388730 | gaspar.kristijan | E | April 6, 2024, 10:03 p.m. | OK | C++14 (GCC 6-32) | TESTS | 52 | 140 | 307200 | ||
255359743 | wuzihan | E | April 6, 2024, 5:33 p.m. | OK | C++14 (GCC 6-32) | TESTS | 48 | 140 | 23961600 | ||
255383910 | Infinity_206 | E | April 6, 2024, 9:04 p.m. | OK | C++14 (GCC 6-32) | TESTS | 52 | 155 | 23961600 | ||
255394702 | khongphaidpduy | E | April 6, 2024, 11:39 p.m. | OK | C++14 (GCC 6-32) | TESTS | 52 | 156 | 32153600 | ||
255398982 | _AYUSH_AGARWAL_ | E | April 7, 2024, 12:59 a.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 61 | 102400 | ||
255401377 | -sam | E | April 7, 2024, 1:43 a.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 62 | 0 | ||
255386745 | viveksingh912 | E | April 6, 2024, 9:38 p.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 62 | 0 | ||
255414817 | Winding. | E | April 7, 2024, 4:59 a.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 62 | 102400 | ||
255414422 | ayushk1234 | E | April 7, 2024, 4:55 a.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 62 | 102400 | ||
255414387 | aspartic29 | E | April 7, 2024, 4:55 a.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 62 | 102400 | ||
255408470 | yash_karakoti | E | April 7, 2024, 3:38 a.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 62 | 102400 | ||
255403773 | Xiaobaibubai | E | April 7, 2024, 2:23 a.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 62 | 102400 | ||
255401890 | -sam | E | April 7, 2024, 1:52 a.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 62 | 102400 | ||
255397024 | Mariam_1027 | E | April 7, 2024, 12:22 a.m. | OK | C++17 (GCC 7-32) | TESTS | 52 | 62 | 102400 | ||
255395586 | Nilesh_ | E | April 6, 2024, 11:54 p.m. | OK | C++20 (GCC 13-64) | TESTS | 52 | 46 | 409600 | ||
255414974 | YYYLLL2021 | E | April 7, 2024, 5:01 a.m. | OK | C++20 (GCC 13-64) | TESTS | 52 | 61 | 102400 | ||
255409099 | NekoYellow | E | April 7, 2024, 3:47 a.m. | OK | C++20 (GCC 13-64) | TESTS | 52 | 61 | 102400 | ||
255370706 | ecnerwala | E | April 6, 2024, 7:07 p.m. | OK | C++20 (GCC 13-64) | TESTS | 51 | 62 | 0 | ||
255365195 | leovl48 | E | April 6, 2024, 6:27 p.m. | OK | C++20 (GCC 13-64) | TESTS | 49 | 62 | 0 | ||
255418632 | AkorToshka | E | April 7, 2024, 5:38 a.m. | OK | C++20 (GCC 13-64) | TESTS | 52 | 62 | 102400 | ||
255418014 | femboy_routine | E | April 7, 2024, 5:32 a.m. | OK | C++20 (GCC 13-64) | TESTS | 52 | 62 | 102400 | ||
255417133 | wanggl | E | April 7, 2024, 5:24 a.m. | OK | C++20 (GCC 13-64) | TESTS | 52 | 62 | 102400 | ||
255411298 | AlexSophia_ | E | April 7, 2024, 4:17 a.m. | OK | C++20 (GCC 13-64) | TESTS | 52 | 62 | 102400 | ||
255408877 | Darsh_Jain | E | April 7, 2024, 3:44 a.m. | OK | C++20 (GCC 13-64) | TESTS | 52 | 62 | 102400 | ||
255398340 | 1435730 | E | April 7, 2024, 12:46 a.m. | OK | GNU C11 | TESTS | 52 | 77 | 1126400 | ||
255365883 | sleepntsheep | E | April 6, 2024, 6:31 p.m. | OK | GNU C11 | TESTS | 51 | 93 | 1126400 | ||
255365837 | sleepntsheep | E | April 6, 2024, 6:30 p.m. | OK | GNU C11 | TESTS | 51 | 108 | 1126400 | ||
255365873 | pengin_2000 | E | April 6, 2024, 6:30 p.m. | OK | GNU C11 | TESTS | 51 | 108 | 2048000 | ||
255380716 | rainboy | E | April 6, 2024, 8:33 p.m. | OK | GNU C11 | TESTS | 52 | 140 | 1126400 | ||
255417432 | nguyenquocthao00 | E | April 7, 2024, 5:27 a.m. | OK | Go | TESTS | 52 | 139 | 37888000 | ||
255401941 | nguyenquocthao00 | E | April 7, 2024, 1:52 a.m. | OK | Go | TESTS | 52 | 140 | 37888000 | ||
255365140 | treasuryonly | E | April 6, 2024, 6:26 p.m. | OK | Haskell | TESTS | 49 | 812 | 114483200 | ||
255377232 | Fanarill | E | April 6, 2024, 8:02 p.m. | OK | Java 21 | TESTS | 52 | 312 | 8396800 | ||
255371953 | man-ray | E | April 6, 2024, 7:16 p.m. | OK | Java 21 | TESTS | 51 | 342 | 48332800 | ||
255390734 | mkah123 | E | April 6, 2024, 10:32 p.m. | OK | Java 21 | TESTS | 52 | 343 | 2457600 | ||
255363409 | Jhinnnnnn | E | April 6, 2024, 6:17 p.m. | OK | Java 21 | TESTS | 48 | 358 | 16793600 | ||
255375678 | WORTH | E | April 6, 2024, 7:47 p.m. | OK | Java 21 | TESTS | 52 | 1562 | 262348800 | ||
255376799 | vatsal_04 | E | April 6, 2024, 7:58 p.m. | OK | Java 8 | TESTS | 52 | 171 | 2150400 | ||
255386600 | fetetriste | E | April 6, 2024, 9:36 p.m. | OK | Java 8 | TESTS | 52 | 233 | 19148800 | ||
255356674 | dalgu | E | April 6, 2024, 5:26 p.m. | OK | PyPy 3 | TESTS | 48 | 546 | 31846400 | ||
255398004 | Little_Sheep_Yawn | E | April 7, 2024, 12:39 a.m. | OK | PyPy 3-64 | TESTS | 52 | 202 | 12492800 | ||
255369443 | teekaytai | E | April 6, 2024, 6:56 p.m. | OK | PyPy 3-64 | TESTS | 51 | 234 | 10035200 | ||
255408174 | voicon | E | April 7, 2024, 3:34 a.m. | OK | PyPy 3-64 | TESTS | 52 | 249 | 9830400 | ||
255374751 | theRealChainman | E | April 6, 2024, 7:40 p.m. | OK | PyPy 3-64 | TESTS | 51 | 280 | 14336000 | ||
255365969 | ankan2526 | E | April 6, 2024, 6:31 p.m. | OK | PyPy 3-64 | TESTS | 51 | 281 | 153292800 | ||
255417918 | dimastrakhal | E | April 7, 2024, 5:31 a.m. | OK | PyPy 3-64 | TESTS | 52 | 296 | 13312000 | ||
255360133 | el_tunel | E | April 6, 2024, 5:34 p.m. | OK | PyPy 3-64 | TESTS | 48 | 312 | 87961600 | ||
255358966 | misorin | E | April 6, 2024, 5:32 p.m. | OK | PyPy 3-64 | TESTS | 48 | 359 | 98099200 | ||
255401559 | YT-OP_Does_cp | E | April 7, 2024, 1:46 a.m. | OK | PyPy 3-64 | TESTS | 52 | 374 | 10035200 | ||
255380680 | jvatsal0709 | E | April 6, 2024, 8:33 p.m. | OK | PyPy 3-64 | TESTS | 52 | 374 | 10035200 | ||
255385140 | OLOGY | E | April 6, 2024, 9:19 p.m. | OK | Python 2 | TESTS | 52 | 218 | 2560000 | ||
255383683 | OLOGY | E | April 6, 2024, 9:02 p.m. | OK | Python 2 | TESTS | 52 | 249 | 2457600 | ||
255420469 | Surin | E | April 7, 2024, 5:54 a.m. | OK | Python 3 | TESTS | 52 | 749 | 26214400 | ||
255381622 | liut | E | April 6, 2024, 8:42 p.m. | OK | Rust 2021 | TESTS | 52 | 62 | 409600 | ||
255383280 | liut | E | April 6, 2024, 8:58 p.m. | OK | Rust 2021 | TESTS | 52 | 77 | 409600 |
Back to search problems