Codeforces Round 527 (Div. 3)

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
1092 Codeforces Round 527 (Div. 3) FINISHED False 7200 192381923 Dec. 18, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5985 ) C Prefixes and Suffixes PROGRAMMING strings 1700

B'Ivan wants to play a game with you. He picked some string s of length n consisting only of lowercase Latin letters. You don 't know this string. Ivan has informed you about all its improper prefixes and suffixes (i.e. prefixes and suffixes of lengths from 1 to n-1 ), but he didn 't tell you which strings are prefixes and which are suffixes. Ivan wants you to guess which of the given 2n-2 strings are prefixes of the given string and which are suffixes. It may be impossible to guess the string Ivan picked (since multiple strings may give the same set of suffixes and prefixes), but Ivan will accept your answer if there is at least one string that is consistent with it. Let the game begin! The first line of the input contains one integer number n ( 2 <= n <= 100 ) -- the length of the guessed string s . The next 2n-2 lines are contain prefixes and suffixes, one per line. Each of them is the string of length from 1 to n-1 consisting only of lowercase Latin letters. They can be given in arbitrary order. It is guaranteed that there are exactly 2 strings of each length from 1 to n-1 . It is also guaranteed that these strings are prefixes and suffixes of some existing string of length n . Print one string of length 2n-2 -- the string consisting only of characters 'P ' and 'S '. The number of characters 'P ' should be equal to the number of characters 'S '. The i -th character of this string should be 'P ' if the i -th of the input strings is the prefix and 'S ' otherwise. If there are several possible answers, you can print any. The only string which Ivan can guess in the first example is "ababa". The only string which Ivan can guess in the second example is "aaa". Answers "SPSP", "SSPP" and "PSPS" are also acceptable. In the third example Ivan can guess the string "ac" or the string "ca". The answer "SP" is also acceptable. '...

Tutorials

Codeforces Round #527 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47281749 xiao_jiu C Dec. 20, 2018, 1:59 a.m. OK Clang++17 Diagnostics TESTS 54 46 1331200 1700
47448227 ACMWGR C Dec. 24, 2018, 7:50 a.m. OK Clang++17 Diagnostics TESTS 54 46 1536000 1700
48428764 ZhouTi C Jan. 15, 2019, 4:13 p.m. OK Clang++17 Diagnostics TESTS 54 62 7372800 1700
54955273 Denor C June 1, 2019, 10:12 p.m. OK Delphi TESTS 54 31 102400 1700
47303619 AHTOH._. C Dec. 20, 2018, 3:31 p.m. OK FPC TESTS 54 31 307200 1700
51669654 chaorenhaha C March 22, 2019, 7:41 a.m. OK FPC TESTS 54 31 614400 1700
47327056 Halian C Dec. 21, 2018, 11 a.m. OK GNU C11 TESTS 54 31 0 1700
47775672 18051928 C Dec. 31, 2018, 3:32 a.m. OK GNU C11 TESTS 54 31 0 1700
47237642 hardShoft C Dec. 18, 2018, 9:43 p.m. OK GNU C11 TESTS 54 31 0 1700
56726356 rainboy C July 8, 2019, 8 p.m. OK GNU C11 TESTS 54 31 0 1700
47824428 shivaan_sehgal C Jan. 1, 2019, 8:40 p.m. OK GNU C11 TESTS 54 31 0 1700
47801150 inbornhandsome C Dec. 31, 2018, 11:06 p.m. OK GNU C11 TESTS 54 31 0 1700
47318238 lyk248289469 C Dec. 21, 2018, 5:56 a.m. OK GNU C11 TESTS 54 31 102400 1700
49614171 geeyiiz C Feb. 8, 2019, 4:47 a.m. OK GNU C11 TESTS 54 31 204800 1700
49303988 tyzc C Feb. 1, 2019, 4:55 a.m. OK GNU C++11 TESTS 54 30 0 1700
48038567 -O_0- C Jan. 6, 2019, 5:24 p.m. OK GNU C++11 TESTS 54 30 0 1700
47881299 iranhosein C Jan. 3, 2019, 6:30 p.m. OK GNU C++11 TESTS 54 30 0 1700
47783495 its_like_never_before C Dec. 31, 2018, 9:25 a.m. OK GNU C++11 TESTS 54 30 0 1700
47253802 heguangfu C Dec. 19, 2018, 9:29 a.m. OK GNU C++11 TESTS 54 30 0 1700
68573201 Contna C Jan. 11, 2020, 3:34 a.m. OK GNU C++11 TESTS 54 30 0 1700
56190423 lixinyue C June 28, 2019, 7:14 a.m. OK GNU C++11 TESTS 54 30 0 1700
66084152 meiron03 C Dec. 1, 2019, 3:09 a.m. OK GNU C++11 TESTS 54 30 102400 1700
47774860 Rockett C Dec. 31, 2018, 2:42 a.m. OK GNU C++11 TESTS 54 30 102400 1700
51273505 Daniel19Frenzy C March 13, 2019, 7:24 p.m. OK GNU C++11 TESTS 54 30 102400 1700
47294736 Bill_Benation C Dec. 20, 2018, 11:22 a.m. OK GNU C++14 TESTS 54 15 204800 1700
47292425 Dezont C Dec. 20, 2018, 10:07 a.m. OK GNU C++14 TESTS 54 15 204800 1700
47443664 btime906 C Dec. 24, 2018, 4:27 a.m. OK GNU C++14 TESTS 54 15 204800 1700
47458898 Matheus.Monteiro C Dec. 24, 2018, 2:03 p.m. OK GNU C++14 TESTS 54 15 204800 1700
58678665 ploplo C Aug. 12, 2019, 5:47 p.m. OK GNU C++14 TESTS 54 15 204800 1700
47373107 shivamg404 C Dec. 22, 2018, 3:27 p.m. OK GNU C++14 TESTS 54 15 204800 1700
47332255 rahul_asnani C Dec. 21, 2018, 1:28 p.m. OK GNU C++14 TESTS 54 15 204800 1700
47308124 ArnavGarg C Dec. 20, 2018, 6 p.m. OK GNU C++14 TESTS 54 15 204800 1700
47360069 Pankin C Dec. 22, 2018, 8:12 a.m. OK GNU C++14 TESTS 54 15 204800 1700
47384391 danq C Dec. 23, 2018, 2:40 a.m. OK GNU C++14 TESTS 54 15 204800 1700
47248062 JackandJackson C Dec. 19, 2018, 6:53 a.m. OK GNU C++17 TESTS 54 15 0 1700
51261974 kuksag C March 13, 2019, 1:43 p.m. OK GNU C++17 TESTS 54 15 204800 1700
47532186 ac517 C Dec. 26, 2018, 8:09 p.m. OK GNU C++17 TESTS 54 15 204800 1700
47512813 vjudge3 C Dec. 26, 2018, 7:44 a.m. OK GNU C++17 TESTS 54 15 204800 1700
47315880 MoMo C Dec. 21, 2018, 3:21 a.m. OK GNU C++17 TESTS 54 15 204800 1700
47307137 rima C Dec. 20, 2018, 5:26 p.m. OK GNU C++17 TESTS 54 15 204800 1700
47301855 lmoura C Dec. 20, 2018, 2:36 p.m. OK GNU C++17 TESTS 54 15 204800 1700
47292026 ordinarv C Dec. 20, 2018, 9:54 a.m. OK GNU C++17 TESTS 54 15 204800 1700
47275845 ashishkr23438 C Dec. 19, 2018, 7:16 p.m. OK GNU C++17 TESTS 54 15 204800 1700
47275231 JonathanR C Dec. 19, 2018, 6:52 p.m. OK GNU C++17 TESTS 54 15 204800 1700
47283620 ledinhbao C Dec. 20, 2018, 4:06 a.m. OK Go TESTS 54 31 0 1700
47273071 Omar_Morsi C Dec. 19, 2018, 5:43 p.m. OK Go TESTS 54 31 0 1700
49203672 UnconfSlnce C Jan. 30, 2019, 1:16 p.m. OK Go TESTS 54 31 0 1700
61296149 synapse C Sept. 26, 2019, 1:16 a.m. OK Go TESTS 54 61 0 1700
49196078 footmanm C Jan. 30, 2019, 10:29 a.m. OK Go TESTS 54 61 0 1700
49201482 ricklee666666 C Jan. 30, 2019, 12:34 p.m. OK Go TESTS 54 62 0 1700
49196259 footmanm C Jan. 30, 2019, 10:34 a.m. OK Go TESTS 54 62 0 1700
49195735 findliubo C Jan. 30, 2019, 10:20 a.m. OK Go TESTS 54 62 0 1700
49195372 footmanm C Jan. 30, 2019, 10:11 a.m. OK Go TESTS 54 62 0 1700
49194374 footmanm C Jan. 30, 2019, 9:41 a.m. OK Go TESTS 54 62 0 1700
69085744 cribabby C Jan. 19, 2020, 8:13 a.m. OK Java 11 TESTS 54 249 204800 1700
54760200 arvind_rvs C May 28, 2019, 3:40 p.m. OK Java 8 TESTS 54 109 0 1700
58713169 Ad-007 C Aug. 13, 2019, 1:02 p.m. OK Java 8 TESTS 54 109 0 1700
58676809 saurabhs1206 C Aug. 12, 2019, 4:53 p.m. OK Java 8 TESTS 54 109 0 1700
57432490 kostasanemozalis C July 21, 2019, 2:29 a.m. OK Java 8 TESTS 54 109 0 1700
54668056 shikhart98 C May 26, 2019, 2:33 p.m. OK Java 8 TESTS 54 109 0 1700
49492087 krit_patel C Feb. 5, 2019, 10:34 a.m. OK Java 8 TESTS 54 109 0 1700
48013243 revanthreddy85 C Jan. 5, 2019, 8:35 p.m. OK Java 8 TESTS 54 109 0 1700
47801866 GiantTornado C Jan. 1, 2019, 12:43 a.m. OK Java 8 TESTS 54 109 0 1700
47610104 freedomforcats C Dec. 28, 2018, 7:36 a.m. OK Java 8 TESTS 54 109 0 1700
47606233 abhi2601 C Dec. 28, 2018, 4:58 a.m. OK Java 8 TESTS 54 109 0 1700
47288004 moss3s C Dec. 20, 2018, 7:27 a.m. OK Kotlin TESTS 54 171 1228800 1700
47234026 hardShoft C Dec. 18, 2018, 7:28 p.m. OK Kotlin TESTS 54 186 1433600 1700
47252694 eki C Dec. 19, 2018, 9 a.m. OK Mono C# TESTS 54 46 204800 1700
56361305 toysheeyeyraku C June 30, 2019, 7:25 p.m. OK Mono C# TESTS 54 46 204800 1700
47229286 Anastasiya_Andreevna C Dec. 18, 2018, 5:24 p.m. OK Mono C# TESTS 54 61 1126400 1700
47234305 hardShoft C Dec. 18, 2018, 7:37 p.m. OK Mono C# TESTS 54 62 102400 1700
51330360 NEvOl C March 15, 2019, 11:54 a.m. OK Mono C# TESTS 54 62 3686400 1700
47317844 xxxcul C Dec. 21, 2018, 5:37 a.m. OK Mono C# TESTS 54 77 3686400 1700
47396073 vanaja.m C Dec. 23, 2018, 11:16 a.m. OK Mono C# TESTS 54 77 3891200 1700
47235205 hardShoft C Dec. 18, 2018, 8:06 p.m. OK Mono C# TESTS 54 92 3686400 1700
47612987 vjudge1 C Dec. 28, 2018, 9:04 a.m. OK MS C++ TESTS 54 30 0 1700
47284621 vjudge1 C Dec. 20, 2018, 5:11 a.m. OK MS C++ TESTS 54 30 0 1700
49037201 vjudge4 C Jan. 27, 2019, 4:19 a.m. OK MS C++ TESTS 54 30 102400 1700
49303401 vjudge1 C Feb. 1, 2019, 4:36 a.m. OK MS C++ TESTS 54 30 204800 1700
53743954 vjudge4 C May 4, 2019, 3:30 p.m. OK MS C++ TESTS 54 31 0 1700
53743659 vjudge5 C May 4, 2019, 3:19 p.m. OK MS C++ TESTS 54 31 0 1700
53743579 vjudge1 C May 4, 2019, 3:16 p.m. OK MS C++ TESTS 54 31 0 1700
53499167 vjudge5 C April 29, 2019, 1:24 p.m. OK MS C++ TESTS 54 31 0 1700
53790002 wjfwjfwjf C May 5, 2019, 12:18 p.m. OK MS C++ TESTS 54 31 0 1700
57617755 vjudge4 C July 24, 2019, 2:36 a.m. OK MS C++ TESTS 54 31 0 1700
57329957 xsc C July 19, 2019, 1:43 p.m. OK MS C++ 2017 TESTS 54 31 0 1700
53038175 skychocowhite C April 20, 2019, 8:22 a.m. OK MS C++ 2017 TESTS 54 31 0 1700
49934273 pill C Feb. 15, 2019, 6:27 a.m. OK MS C++ 2017 TESTS 54 31 0 1700
62393343 vjudge3 C Oct. 12, 2019, 4 a.m. OK MS C++ 2017 TESTS 54 31 102400 1700
50544097 dslom C Feb. 26, 2019, 8:01 p.m. OK MS C++ 2017 TESTS 54 31 102400 1700
57618549 vjudge5 C July 24, 2019, 3:05 a.m. OK MS C++ 2017 TESTS 54 31 102400 1700
58711511 ZSTU-2018329621261 C Aug. 13, 2019, 12:25 p.m. OK MS C++ 2017 TESTS 54 31 102400 1700
54840117 hwangganzi C May 30, 2019, 12:25 p.m. OK MS C++ 2017 TESTS 54 31 102400 1700
52353991 NVX C April 5, 2019, 3:53 p.m. OK MS C++ 2017 TESTS 54 31 102400 1700
49557723 Gladius_Smerch C Feb. 7, 2019, 10:43 a.m. OK MS C++ 2017 TESTS 54 46 0 1700
47229526 sk0 C Dec. 18, 2018, 5:29 p.m. OK Ocaml TESTS 54 15 0 1700
47228502 sk0 C Dec. 18, 2018, 5:08 p.m. OK Ocaml TESTS 54 15 0 1700
47235963 conchoda C Dec. 18, 2018, 8:30 p.m. OK PascalABC.NET TESTS 54 62 409600 1700
51951531 mm944 C March 28, 2019, 8:37 p.m. OK PascalABC.NET TESTS 54 187 0 1700
47237628 hardShoft C Dec. 18, 2018, 9:42 p.m. OK Perl TESTS 54 31 204800 1700
47233168 physis C Dec. 18, 2018, 7:04 p.m. OK Perl TESTS 54 46 204800 1700
47236804 mayakin C Dec. 18, 2018, 8:59 p.m. OK PHP TESTS 54 46 512000 1700
48393137 ssk497 C Jan. 14, 2019, 4:18 p.m. OK PyPy 2 TESTS 54 124 0 1700
47251189 masonsbro C Dec. 19, 2018, 8:20 a.m. OK PyPy 2 TESTS 54 124 0 1700
47233274 mikal09 C Dec. 18, 2018, 7:08 p.m. OK PyPy 2 TESTS 54 124 0 1700
47241857 wangkan2001 C Dec. 19, 2018, 2:35 a.m. OK PyPy 2 TESTS 54 139 307200 1700
47236284 conchoda C Dec. 18, 2018, 8:41 p.m. OK PyPy 2 TESTS 54 139 307200 1700
47235682 conchoda C Dec. 18, 2018, 8:21 p.m. OK PyPy 2 TESTS 54 140 0 1700
47229716 c1729 C Dec. 18, 2018, 5:34 p.m. OK PyPy 2 TESTS 54 140 0 1700
50783294 gatsko C March 4, 2019, 12:21 p.m. OK PyPy 2 TESTS 54 140 1228800 1700
47232548 unsignedlonglong C Dec. 18, 2018, 6:48 p.m. OK PyPy 2 TESTS 54 155 0 1700
51945177 soumyasarkar1998 C March 28, 2019, 4:30 p.m. OK PyPy 2 TESTS 54 202 0 1700
49394674 265918 C Feb. 3, 2019, 11:55 a.m. OK PyPy 3 TESTS 54 139 0 1700
49366918 DICS C Feb. 2, 2019, 3:29 p.m. OK PyPy 3 TESTS 54 139 0 1700
47823320 Mr.Inconsistent C Jan. 1, 2019, 7:36 p.m. OK PyPy 3 TESTS 54 139 0 1700
47818441 deadguy C Jan. 1, 2019, 4 p.m. OK PyPy 3 TESTS 54 139 0 1700
52140338 185217 C April 1, 2019, 6:22 a.m. OK PyPy 3 TESTS 54 139 102400 1700
64162793 Mai-sanBestWaifu C Nov. 3, 2019, 3:08 p.m. OK PyPy 3 TESTS 54 140 0 1700
53942660 nurdtechie98 C May 10, 2019, 4:24 a.m. OK PyPy 3 TESTS 54 140 0 1700
51377021 sanvi_kiit C March 16, 2019, 2:31 p.m. OK PyPy 3 TESTS 54 140 0 1700
48198819 megaspazz C Jan. 11, 2019, 3:05 a.m. OK PyPy 3 TESTS 54 140 0 1700
47279642 Praxis C Dec. 19, 2018, 10:28 p.m. OK PyPy 3 TESTS 54 140 0 1700
49990590 fortmax120 C Feb. 16, 2019, 12:38 p.m. OK Python 2 TESTS 54 171 0 1700
47617795 alessandrosolbiati C Dec. 28, 2018, 11:24 a.m. OK Python 2 TESTS 54 171 0 1700
47395972 water C Dec. 23, 2018, 11:12 a.m. OK Python 2 TESTS 54 171 0 1700
47253915 enchantedpudding C Dec. 19, 2018, 9:33 a.m. OK Python 2 TESTS 54 171 0 1700
47234330 hardShoft C Dec. 18, 2018, 7:38 p.m. OK Python 2 TESTS 54 171 0 1700
47273806 iprakhar22 C Dec. 19, 2018, 6:08 p.m. OK Python 2 TESTS 54 171 102400 1700
47266720 anshuman16423 C Dec. 19, 2018, 2:38 p.m. OK Python 2 TESTS 54 171 102400 1700
47236533 IbragiMMamilov C Dec. 18, 2018, 8:48 p.m. OK Python 2 TESTS 54 171 307200 1700
47237633 nealkarpe C Dec. 18, 2018, 9:42 p.m. OK Python 2 TESTS 54 186 0 1700
48396276 conjecture_xyz C Jan. 14, 2019, 5:52 p.m. OK Python 2 TESTS 54 187 0 1700
56234817 Vasiliy_48 C June 28, 2019, 3:44 p.m. OK Python 3 TESTS 54 109 0 1700
54830908 tushartyagi8750 C May 30, 2019, 8:53 a.m. OK Python 3 TESTS 54 109 0 1700
53583232 GreMon C April 30, 2019, 4:50 p.m. OK Python 3 TESTS 54 109 0 1700
47813990 dincher C Jan. 1, 2019, 1:13 p.m. OK Python 3 TESTS 54 109 0 1700
47530378 vivekgoyalams C Dec. 26, 2018, 6:36 p.m. OK Python 3 TESTS 54 109 0 1700
47495623 OFShare C Dec. 25, 2018, 2:45 p.m. OK Python 3 TESTS 54 109 0 1700
47494406 sagami C Dec. 25, 2018, 2:10 p.m. OK Python 3 TESTS 54 109 0 1700
47450294 problem_solved C Dec. 24, 2018, 9:10 a.m. OK Python 3 TESTS 54 109 0 1700
47382215 OsamaFathy C Dec. 22, 2018, 10:50 p.m. OK Python 3 TESTS 54 109 0 1700
47328191 naruto C Dec. 21, 2018, 11:31 a.m. OK Python 3 TESTS 54 109 0 1700
47235567 Jumnast C Dec. 18, 2018, 8:17 p.m. OK Ruby TESTS 54 62 102400 1700
47232964 rinzu C Dec. 18, 2018, 6:59 p.m. OK Ruby TESTS 54 62 102400 1700
47280762 koprus77 C Dec. 20, 2018, 12:24 a.m. OK Ruby TESTS 54 93 102400 1700
48761190 anduturacila6 C Jan. 22, 2019, 5:23 p.m. OK Rust TESTS 54 31 102400 1700
48761081 anduturacila6 C Jan. 22, 2019, 5:15 p.m. OK Rust TESTS 54 31 102400 1700
47232894 yakamoto C Dec. 18, 2018, 6:58 p.m. OK Scala TESTS 54 483 0 1700
47610802 hot_yoghurt C Dec. 28, 2018, 8:01 a.m. OK Scala TESTS 54 514 409600 1700

remove filters

Back to search problems