Codeforces Round 467 (Div. 1)

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
936 Codeforces Round 467 (Div. 1) FINISHED False 7200 256830923 Feb. 25, 2018, 4:05 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1257 ) C Lock Puzzle PROGRAMMING constructive algorithms implementation strings 2500

Welcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of which, according to rumors, there are untold riches, among which one can find the solution of the problem of discrete logarithm! Of course, there is a code lock is installed on the safe. The lock has a screen that displays a string of n lowercase Latin letters. Initially, the screen displays string s . Whitfield and Martin found out that the safe will open when string t will be displayed on the screen. The string on the screen can be changed using the operation « shift x ». In order to apply this operation, explorers choose an integer x from 0 to n inclusive. After that, the current string p = αβ changes to β R α , where the length of β is x , and the length of α is n - x . In other words, the suffix of the length x of string p is reversed and moved to the beginning of the string. For example, after the operation « shift 4 » the string « abcacb » will be changed with string « bcacab », since α = ab , β = cacb , β R = bcac . Explorers are afraid that if they apply too many operations « shift », the lock will be locked forever. They ask you to find a way to get the string t on the screen, using no more than 6100 operations. The first line contains an integer n , the length of the strings s and t ( 1 ≤ n ≤ 2 000 ). After that, there are two strings s and t , consisting of n lowercase Latin letters each. If it is impossible to get string t from string s using no more than 6100 operations « shift », print a single number - 1 . Otherwise, in the first line output the number of operations k ( 0 ≤ k ≤ 6100 ). In the next line output k numbers x i corresponding to the operations « shift x i » ( 0 ≤ x i ≤ n ) in the order in which they should be applied. In the first example, after applying the operations, the string on the screen will change as follows: abacbb bbcaba bbc aba ababbc abab bc cbabab cba bab babcba

Tutorials

Codeforces Round #467, Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
35700645 FalseMirror C Feb. 25, 2018, 5:11 p.m. OK D TESTS 39 62 7168000 2500
35711900 Gassa C Feb. 25, 2018, 8:16 p.m. OK D TESTS 39 264 7168000 2500
35711470 Gassa C Feb. 25, 2018, 8:01 p.m. OK D TESTS 39 265 7168000 2500
35697955 Gassa C Feb. 25, 2018, 4:55 p.m. OK D TESTS 39 265 7168000 2500
36159577 Butylochnik C March 10, 2018, 3:59 p.m. OK GNU C TESTS 39 15 5939200 2500
35889675 caen C March 3, 2018, 2:43 p.m. OK GNU C TESTS 39 30 2048000 2500
35737197 TsReaper C Feb. 26, 2018, 3:39 p.m. OK GNU C TESTS 39 31 2048000 2500
36391932 mbrc C March 18, 2018, 2:26 p.m. OK GNU C TESTS 39 46 3379200 2500
35807013 luogu_bot5 C March 1, 2018, 9:18 a.m. OK GNU C++ TESTS 39 15 1945600 2500
35748451 Blue233333 C Feb. 27, 2018, 12:47 a.m. OK GNU C++ TESTS 39 15 2048000 2500
35907934 luogu_bot3 C March 4, 2018, 6:08 a.m. OK GNU C++ TESTS 39 15 2150400 2500
35865630 redbag C March 3, 2018, 12:54 a.m. OK GNU C++ TESTS 39 15 2150400 2500
35917686 luogu_bot2 C March 4, 2018, 11:13 a.m. OK GNU C++ TESTS 39 15 2252800 2500
35725940 skywalkert C Feb. 26, 2018, 9:11 a.m. OK GNU C++ TESTS 39 15 2252800 2500
35722569 XingGeRuCi C Feb. 26, 2018, 7:03 a.m. OK GNU C++ TESTS 39 15 2252800 2500
35697913 djqtxdy C Feb. 25, 2018, 4:55 p.m. OK GNU C++ TESTS 39 15 2252800 2500
35704448 skuecrk C Feb. 25, 2018, 5:40 p.m. OK GNU C++ TESTS 39 30 1843200 2500
35913144 luogu_bot3 C March 4, 2018, 8:37 a.m. OK GNU C++ TESTS 39 30 2150400 2500
68047058 rainboy C Jan. 1, 2020, 4:56 p.m. OK GNU C11 TESTS 39 46 0 2500
35702345 Antimony C Feb. 25, 2018, 5:22 p.m. OK GNU C++11 TESTS 39 15 1945600 2500
35869001 ycx1993 C March 3, 2018, 5:31 a.m. OK GNU C++11 TESTS 39 15 1945600 2500
35810333 Stelutzu C March 1, 2018, 11:49 a.m. OK GNU C++11 TESTS 39 15 1945600 2500
35788981 hmfzy C Feb. 28, 2018, 3:07 p.m. OK GNU C++11 TESTS 39 15 1945600 2500
35807162 PinkRabbit C March 1, 2018, 9:26 a.m. OK GNU C++11 TESTS 39 15 2048000 2500
35758616 Ewwa C Feb. 27, 2018, 10:46 a.m. OK GNU C++11 TESTS 39 15 2048000 2500
35700646 tlwpdus C Feb. 25, 2018, 5:11 p.m. OK GNU C++11 TESTS 39 15 2048000 2500
35864434 Turing.Machine C March 2, 2018, 11:11 p.m. OK GNU C++11 TESTS 39 15 2048000 2500
35825086 Roundgod C March 2, 2018, 4:41 a.m. OK GNU C++11 TESTS 39 15 2150400 2500
36032584 cbhcbh C March 7, 2018, 4:37 a.m. OK GNU C++11 TESTS 39 15 2150400 2500
35705610 gina0605 C Feb. 25, 2018, 5:48 p.m. OK GNU C++14 TESTS 39 15 1843200 2500
36048086 JHSN C March 7, 2018, 2:38 p.m. OK GNU C++14 TESTS 39 15 1945600 2500
35985742 HappyEnd C March 6, 2018, 8:46 a.m. OK GNU C++14 TESTS 39 15 1945600 2500
35906612 iaojnh C March 4, 2018, 4:18 a.m. OK GNU C++14 TESTS 39 15 1945600 2500
35824390 Maripium C March 2, 2018, 3:50 a.m. OK GNU C++14 TESTS 39 15 1945600 2500
35788837 PinkRabbit C Feb. 28, 2018, 3:01 p.m. OK GNU C++14 TESTS 39 15 1945600 2500
36132910 Mohinem C March 10, 2018, 12:04 a.m. OK GNU C++14 TESTS 39 15 1945600 2500
35767680 Billyshuai C Feb. 27, 2018, 3:39 p.m. OK GNU C++14 TESTS 39 15 1945600 2500
35758967 hitman623 C Feb. 27, 2018, 11 a.m. OK GNU C++14 TESTS 39 15 1945600 2500
35773538 Bogdanisar C Feb. 27, 2018, 7:40 p.m. OK GNU C++14 TESTS 39 15 1945600 2500
53425274 pppkun C April 27, 2019, 1:18 p.m. OK GNU C++17 TESTS 39 15 102400 2500
36127400 FariduN_05 C March 9, 2018, 6:52 p.m. OK GNU C++17 TESTS 39 15 1945600 2500
35701828 112 C Feb. 25, 2018, 5:19 p.m. OK GNU C++17 TESTS 39 15 1945600 2500
35703725 Jakube C Feb. 25, 2018, 5:34 p.m. OK GNU C++17 TESTS 39 15 2048000 2500
35778153 Aimi C Feb. 28, 2018, 8:13 a.m. OK GNU C++17 TESTS 39 15 2048000 2500
35697044 V--o_o--V C Feb. 25, 2018, 4:51 p.m. OK GNU C++17 TESTS 39 15 2150400 2500
36087200 vjudge3 C March 9, 2018, 5:14 a.m. OK GNU C++17 TESTS 39 30 1945600 2500
35770538 InkyFlameMaster C Feb. 27, 2018, 5:24 p.m. OK GNU C++17 TESTS 39 30 1945600 2500
35711005 RCG C Feb. 25, 2018, 7:48 p.m. OK GNU C++17 TESTS 39 30 1945600 2500
35717120 Shik C Feb. 26, 2018, 1:48 a.m. OK GNU C++17 TESTS 39 30 2252800 2500
35701885 Martynas C Feb. 25, 2018, 5:19 p.m. OK Go TESTS 39 15 23040000 2500
61683305 WangJialei C Oct. 2, 2019, 2:32 a.m. OK Go TESTS 39 62 5324800 2500
61683406 vjudge5 C Oct. 2, 2019, 2:35 a.m. OK Go TESTS 39 78 5324800 2500
68047059 Dukkha C Jan. 1, 2020, 4:56 p.m. OK Java 11 TESTS 39 218 0 2500
36467470 dalt C March 22, 2018, 2:04 a.m. OK Java 8 TESTS 39 140 20684800 2500
35924630 tmwilliamlin168 C March 4, 2018, 1:47 p.m. OK Java 8 TESTS 39 140 20787200 2500
38992760 habanera C June 6, 2018, 11:15 a.m. OK Java 8 TESTS 39 155 0 2500
35710778 fetetriste C Feb. 25, 2018, 7:42 p.m. OK Java 8 TESTS 39 155 20684800 2500
35693906 Petr C Feb. 25, 2018, 4:36 p.m. OK Java 8 TESTS 39 155 20684800 2500
35703066 Lewin C Feb. 25, 2018, 5:28 p.m. OK Java 8 TESTS 39 155 20787200 2500
35966257 mmaxio C March 5, 2018, 1:12 p.m. OK Java 8 TESTS 39 155 20889600 2500
35698308 Egor C Feb. 25, 2018, 4:58 p.m. OK Java 8 TESTS 39 155 20889600 2500
35740152 vovacomua C Feb. 26, 2018, 5:26 p.m. OK Java 8 TESTS 39 171 20787200 2500
38769694 Golmol C May 30, 2018, 10:54 a.m. OK Java 8 TESTS 39 171 20889600 2500
35699307 camypaper C Feb. 25, 2018, 5:03 p.m. OK MS C# TESTS 39 93 14950400 2500
35725271 absi2011 C Feb. 26, 2018, 8:47 a.m. OK MS C++ TESTS 39 30 2355200 2500
61427586 vjudge3 C Sept. 28, 2019, 1:37 p.m. OK MS C++ TESTS 39 31 102400 2500
53425148 vjudge2 C April 27, 2019, 1:15 p.m. OK MS C++ TESTS 39 31 204800 2500
35700736 Perforator C Feb. 25, 2018, 5:12 p.m. OK MS C++ TESTS 39 31 2150400 2500
35792654 keklol360 C Feb. 28, 2018, 5:44 p.m. OK MS C++ TESTS 39 31 2560000 2500
37352218 pericle C April 15, 2018, 11:48 a.m. OK MS C++ TESTS 39 31 3584000 2500
63956033 vjudge3 C Nov. 1, 2019, 1:39 a.m. OK MS C++ TESTS 39 46 102400 2500
63988632 vjudge5 C Nov. 1, 2019, 12:30 p.m. OK MS C++ TESTS 39 62 102400 2500
35716644 masonsbro C Feb. 26, 2018, 1:17 a.m. OK PyPy 2 TESTS 39 343 29286400 2500
66213009 chielo C Dec. 3, 2019, 7:42 a.m. OK PyPy 3 TESTS 39 187 3379200 2500
35780588 Hemant_323 C Feb. 28, 2018, 9:58 a.m. OK Python 2 TESTS 39 93 4915200 2500
35780517 Hemant_323 C Feb. 28, 2018, 9:55 a.m. OK Python 2 TESTS 39 124 4915200 2500
53427462 vjudge5 C April 27, 2019, 2:24 p.m. OK Python 3 TESTS 39 124 512000 2500
35780605 Hemant_323 C Feb. 28, 2018, 9:59 a.m. OK Python 3 TESTS 39 124 6041600 2500
36429363 When C March 20, 2018, 10 a.m. OK Python 3 TESTS 39 124 7475200 2500
53455816 vjudge2 C April 28, 2019, 2:28 a.m. OK Python 3 TESTS 39 139 512000 2500
53425407 vjudge3 C April 27, 2019, 1:23 p.m. OK Python 3 TESTS 39 139 512000 2500
53425430 vjudge1 C April 27, 2019, 1:23 p.m. OK Python 3 TESTS 39 140 512000 2500
53425216 vjudge3 C April 27, 2019, 1:17 p.m. OK Python 3 TESTS 39 140 614400 2500
42142393 Mk_Python_v1 C Aug. 27, 2018, 6:30 a.m. OK Python 3 TESTS 39 171 409600 2500

remove filters

Back to search problems