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 |
---|---|---|---|---|---|---|
1109 | Codeforces Round 539 (Div. 1) | FINISHED | False | 9000 | 186845063 | Feb. 16, 2019, 4:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 4386 ) | B | Sasha and One More Name | PROGRAMMING | constructive algorithms hashing strings | 1800 |
B'Reading books is one of Sasha 's passions. Once while he was reading one book, he became acquainted with an unusual character. The character told about himself like that: "Many are my names in many countries. Mithrandir among the Elves, Thark xc3 xbbn to the Dwarves, Ol xc3 xb3rin I was in my youth in the West that is forgotten, in the South Inc xc3 xa1nus, in the North Gandalf; to the East I go not." And at that moment Sasha thought, how would that character be called in the East? In the East all names are palindromes. A string is a palindrome if it reads the same backward as forward. For example, such strings as "kazak", "oo" and "r" are palindromes, but strings "abb" and "ij" are not. Sasha believed that the hero would be named after one of the gods of the East. As long as there couldn 't be two equal names, so in the East people did the following: they wrote the original name as a string on a piece of paper, then cut the paper minimum number of times k , so they got k+1 pieces of paper with substrings of the initial string, and then unite those pieces together to get a new string. Pieces couldn 't be turned over, they could be shuffled. In this way, it 's possible to achive a string abcdefg from the string f|de|abc|g using 3 cuts (by swapping papers with substrings f and abc). The string cbadefg can 't be received using the same cuts. More formally, Sasha wants for the given palindrome s find such minimum k , that you can cut this string into k + 1 parts, and then unite them in such a way that the final string will be a palindrome and it won 't be equal to the initial string s . It there is no answer, then print "Impossible" (without quotes). The first line contains one string s ( 1 <= |s| <= 5 ,000 ) -- the initial name, which consists only of lowercase Latin letters. It is guaranteed that s is a palindrome. Print one integer k -- the minimum number of cuts needed to get a new name, or "Impossible" (without '... |
Codeforces Round #539 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
50066212 | ahshafi | B | Feb. 17, 2019, 2:55 p.m. | OK | GNU C11 | TESTS | 62 | 31 | 0 | 1800 | |
50066345 | ahshafi | B | Feb. 17, 2019, 2:59 p.m. | OK | GNU C11 | TESTS | 62 | 31 | 0 | 1800 | |
50050464 | libra8z | B | Feb. 17, 2019, 7:55 a.m. | OK | GNU C11 | TESTS | 62 | 46 | 0 | 1800 | |
50004923 | rainboy | B | Feb. 16, 2019, 4:51 p.m. | OK | GNU C11 | TESTS | 61 | 46 | 0 | 1800 | |
53223827 | warrenmom | B | April 24, 2019, 1:19 p.m. | OK | GNU C++11 | TESTS | 62 | 30 | 0 | 1800 | |
50043059 | SidneySun | B | Feb. 17, 2019, 3:43 a.m. | OK | GNU C++11 | TESTS | 62 | 30 | 0 | 1800 | |
68489342 | luogu_bot1 | B | Jan. 10, 2020, 11:07 a.m. | OK | GNU C++11 | TESTS | 62 | 31 | 0 | 1800 | |
64310699 | Kai_Admin | B | Nov. 5, 2019, 12:40 p.m. | OK | GNU C++11 | TESTS | 62 | 31 | 0 | 1800 | |
63992744 | Z__C | B | Nov. 1, 2019, 1:39 p.m. | OK | GNU C++11 | TESTS | 62 | 31 | 0 | 1800 | |
63991852 | wangyiding | B | Nov. 1, 2019, 1:23 p.m. | OK | GNU C++11 | TESTS | 62 | 31 | 0 | 1800 | |
63991832 | xwc | B | Nov. 1, 2019, 1:22 p.m. | OK | GNU C++11 | TESTS | 62 | 31 | 0 | 1800 | |
64672153 | __Salty__ | B | Nov. 11, 2019, 6:29 a.m. | OK | GNU C++11 | TESTS | 62 | 31 | 0 | 1800 | |
68662225 | _dark_side | B | Jan. 12, 2020, 2 p.m. | OK | GNU C++11 | TESTS | 62 | 31 | 0 | 1800 | |
68489356 | pkh68 | B | Jan. 10, 2020, 11:07 a.m. | OK | GNU C++11 | TESTS | 62 | 31 | 0 | 1800 | |
50607145 | damon2598 | B | Feb. 28, 2019, 3:04 p.m. | OK | GNU C++14 | TESTS | 62 | 15 | 0 | 1800 | |
50101712 | wasyl | B | Feb. 18, 2019, 3:14 p.m. | OK | GNU C++14 | TESTS | 62 | 30 | 0 | 1800 | |
54021801 | aniket9465 | B | May 12, 2019, 10:11 a.m. | OK | GNU C++14 | TESTS | 62 | 30 | 0 | 1800 | |
51342939 | KirillPal | B | March 15, 2019, 5:02 p.m. | OK | GNU C++14 | TESTS | 62 | 30 | 0 | 1800 | |
51211545 | vjudge4 | B | March 12, 2019, 8:11 a.m. | OK | GNU C++14 | TESTS | 62 | 30 | 0 | 1800 | |
51211444 | HouZAJ | B | March 12, 2019, 8:08 a.m. | OK | GNU C++14 | TESTS | 62 | 30 | 0 | 1800 | |
50778444 | kumarpratyush4 | B | March 4, 2019, 9:59 a.m. | OK | GNU C++14 | TESTS | 62 | 30 | 0 | 1800 | |
50483136 | wtd2 SUSTechDFS lanran2001 | B | Feb. 25, 2019, 10:08 a.m. | OK | GNU C++14 | TESTS | 62 | 30 | 0 | 1800 | |
50046411 | Response777 | B | Feb. 17, 2019, 6:09 a.m. | OK | GNU C++14 | TESTS | 62 | 30 | 0 | 1800 | |
50025332 | MofK | B | Feb. 16, 2019, 6:12 p.m. | OK | GNU C++14 | TESTS | 61 | 30 | 0 | 1800 | |
50040526 | PrimeG | B | Feb. 17, 2019, 1:22 a.m. | OK | GNU C++17 | TESTS | 62 | 15 | 0 | 1800 | |
50047851 | Silly_Bee | B | Feb. 17, 2019, 6:51 a.m. | OK | GNU C++17 | TESTS | 62 | 30 | 0 | 1800 | |
52534966 | vietnakid | B | April 9, 2019, 3:10 p.m. | OK | GNU C++17 | TESTS | 62 | 30 | 0 | 1800 | |
54351873 | rutul204 | B | May 18, 2019, 3:19 p.m. | OK | GNU C++17 | TESTS | 62 | 30 | 0 | 1800 | |
55403660 | RajShekhar2020 | B | June 10, 2019, 3:22 p.m. | OK | GNU C++17 | TESTS | 62 | 30 | 0 | 1800 | |
50424025 | idxcalccalc | B | Feb. 24, 2019, 10:34 a.m. | OK | GNU C++17 | TESTS | 62 | 30 | 102400 | 1800 | |
50011962 | benmirt | B | Feb. 16, 2019, 5:12 p.m. | OK | GNU C++17 | TESTS | 61 | 30 | 102400 | 1800 | |
50014790 | Bassel | B | Feb. 16, 2019, 5:22 p.m. | OK | GNU C++17 | TESTS | 61 | 30 | 204800 | 1800 | |
50209990 | v9the | B | Feb. 19, 2019, 10:17 p.m. | OK | GNU C++17 | TESTS | 62 | 30 | 204800 | 1800 | |
50045832 | teapotd | B | Feb. 17, 2019, 5:50 a.m. | OK | GNU C++17 | TESTS | 62 | 30 | 204800 | 1800 | |
63389616 | Shady51 | B | Oct. 25, 2019, 2:48 p.m. | OK | Java 11 | TESTS | 62 | 233 | 0 | 1800 | |
63389376 | Shady51 | B | Oct. 25, 2019, 2:44 p.m. | OK | Java 11 | TESTS | 62 | 234 | 0 | 1800 | |
56814228 | jdurie | B | July 10, 2019, 6:05 p.m. | OK | Java 8 | TESTS | 62 | 124 | 0 | 1800 | |
52583701 | beroul | B | April 10, 2019, 9:12 p.m. | OK | Java 8 | TESTS | 62 | 124 | 0 | 1800 | |
50017361 | icpc_loser | B | Feb. 16, 2019, 5:33 p.m. | OK | Java 8 | TESTS | 61 | 124 | 0 | 1800 | |
52297850 | dtsarun | B | April 4, 2019, 7:15 a.m. | OK | Java 8 | TESTS | 62 | 139 | 0 | 1800 | |
58891003 | saurabhs1206 | B | Aug. 16, 2019, 5:36 a.m. | OK | Java 8 | TESTS | 62 | 140 | 0 | 1800 | |
58216753 | JCKG | B | Aug. 3, 2019, 11:03 a.m. | OK | Java 8 | TESTS | 62 | 140 | 0 | 1800 | |
50035465 | PrakharJain | B | Feb. 16, 2019, 8:34 p.m. | OK | Java 8 | TESTS | 61 | 140 | 0 | 1800 | |
50018955 | iakovlev.zakhar | B | Feb. 16, 2019, 5:40 p.m. | OK | Java 8 | TESTS | 61 | 140 | 0 | 1800 | |
50012797 | Dukkha | B | Feb. 16, 2019, 5:15 p.m. | OK | Java 8 | TESTS | 61 | 140 | 0 | 1800 | |
50011149 | Suzukaze | B | Feb. 16, 2019, 5:09 p.m. | OK | Java 8 | TESTS | 61 | 140 | 0 | 1800 | |
50154759 | mrskotlin | B | Feb. 19, 2019, 9:23 a.m. | OK | Kotlin | TESTS | 62 | 187 | 0 | 1800 | |
50124660 | abhishek_1 | B | Feb. 18, 2019, 5:02 p.m. | OK | MS C++ | TESTS | 62 | 31 | 0 | 1800 | |
54163193 | vjudge3 | B | May 15, 2019, 7:32 a.m. | OK | MS C++ | TESTS | 62 | 31 | 102400 | 1800 | |
51032448 | vjudge5 | B | March 8, 2019, 1:39 p.m. | OK | MS C++ | TESTS | 62 | 31 | 102400 | 1800 | |
50029564 | BaturaDima | B | Feb. 16, 2019, 6:40 p.m. | OK | MS C++ | TESTS | 61 | 31 | 102400 | 1800 | |
54163238 | vjudge3 | B | May 15, 2019, 7:33 a.m. | OK | MS C++ | TESTS | 62 | 31 | 204800 | 1800 | |
54154229 | vjudge4 | B | May 15, 2019, 3:02 a.m. | OK | MS C++ | TESTS | 62 | 31 | 204800 | 1800 | |
50041269 | dkyun | B | Feb. 17, 2019, 2:08 a.m. | OK | MS C++ | TESTS | 62 | 46 | 0 | 1800 | |
54161884 | vjudge1 | B | May 15, 2019, 6:56 a.m. | OK | MS C++ | TESTS | 62 | 233 | 1228800 | 1800 | |
50226264 | jhoowy | B | Feb. 20, 2019, 7:27 a.m. | OK | MS C++ 2017 | TESTS | 62 | 31 | 0 | 1800 | |
54071426 | Timonnable | B | May 13, 2019, 4:28 p.m. | OK | MS C++ 2017 | TESTS | 62 | 31 | 204800 | 1800 | |
50007676 | aeremin | B | Feb. 16, 2019, 4:59 p.m. | OK | MS C++ 2017 | TESTS | 61 | 46 | 204800 | 1800 | |
50097309 | Extraordinary_ | B | Feb. 18, 2019, 1:18 p.m. | OK | MS C++ 2017 | TESTS | 62 | 62 | 27443200 | 1800 | |
50011098 | pajenegod | B | Feb. 16, 2019, 5:09 p.m. | OK | PyPy 2 | TESTS | 61 | 156 | 1433600 | 1800 | |
50003012 | aeternalis1 | B | Feb. 16, 2019, 4:47 p.m. | OK | PyPy 2 | TESTS | 61 | 436 | 7577600 | 1800 | |
50015034 | mylyanyk.ivan | B | Feb. 16, 2019, 5:23 p.m. | OK | PyPy 3 | TESTS | 61 | 171 | 3174400 | 1800 | |
50295315 | FadeoN | B | Feb. 21, 2019, 8 p.m. | OK | PyPy 3 | TESTS | 62 | 171 | 6758400 | 1800 | |
50015928 | LiTi | B | Feb. 16, 2019, 5:27 p.m. | OK | PyPy 3 | TESTS | 61 | 186 | 3891200 | 1800 | |
68393190 | Vrikodara | B | Jan. 8, 2020, 9:40 a.m. | OK | PyPy 3 | TESTS | 62 | 187 | 3174400 | 1800 | |
50056121 | artifexbm | B | Feb. 17, 2019, 10:25 a.m. | OK | PyPy 3 | TESTS | 62 | 202 | 7782400 | 1800 | |
60323996 | Durumu | B | Sept. 9, 2019, 10:53 p.m. | OK | PyPy 3 | TESTS | 62 | 389 | 9420800 | 1800 | |
57071824 | saku7 | B | July 15, 2019, 2:59 a.m. | OK | PyPy 3 | TESTS | 62 | 451 | 9420800 | 1800 | |
51904623 | Nika86 | B | March 27, 2019, 2:54 p.m. | OK | Python 2 | TESTS | 62 | 436 | 1536000 | 1800 | |
51980984 | codershuvo | B | March 29, 2019, 4:18 p.m. | OK | Python 3 | TESTS | 62 | 139 | 2048000 | 1800 | |
51941058 | iomodo | B | March 28, 2019, 2:30 p.m. | OK | Python 3 | TESTS | 62 | 779 | 2048000 | 1800 |
Back to search problems