Codeforces Round 505 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final)

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
1025 Codeforces Round 505 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) FINISHED False 8100 197137499 Aug. 19, 2018, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6144 ) C Plasticine zebra PROGRAMMING constructive algorithms implementation 1600

B'Is there anything better than going to the zoo after a tiresome week at work? No wonder Grisha feels the same while spending the entire weekend accompanied by pretty striped zebras. Inspired by this adventure and an accidentally found plasticine pack (represented as a sequence of black and white stripes), Grisha now wants to select several consequent (contiguous) pieces of alternating colors to create a zebra. Let 's call the number of selected pieces the length of the zebra. Before assembling the zebra Grisha can make the following operation 0 or more times. He splits the sequence in some place into two parts, then reverses each of them and sticks them together again. For example, if Grisha has pieces in the order "bwbbw" (here 'b ' denotes a black strip, and 'w ' denotes a white strip), then he can split the sequence as bw|bbw (here the vertical bar represents the cut), reverse both parts and obtain "wbwbb". Determine the maximum possible length of the zebra that Grisha can produce. The only line contains a string s ( 1 <= |s| <= 10^5 , where |s| denotes the length of the string s ) comprised of lowercase English letters 'b ' and 'w ' only, where 'w ' denotes a white piece and 'b ' denotes a black piece. Print a single integer -- the maximum possible zebra length. In the first example one of the possible sequence of operations is bwwwbww|bw to w|wbwwwbwb to wbwbwwwbw, that gives the answer equal to 5 . In the second example no operation can increase the answer. '...

Tutorials

Codeforces Round #505 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
41917236 rr_ C Aug. 20, 2018, 11:47 p.m. OK D TESTS 50 31 4198400 1600
64452724 hos.lyric C Nov. 7, 2019, 7:41 a.m. OK D TESTS 50 31 4198400 1600
42002906 ruban C Aug. 23, 2018, 4:24 p.m. OK Delphi TESTS 50 46 12288000 1600
62431567 LaSWeeG C Oct. 12, 2019, 3:59 p.m. OK Delphi TESTS 50 62 409600 1600
41891834 AHTOH._. C Aug. 20, 2018, 7:33 a.m. OK FPC TESTS 50 31 819200 1600
42117264 TShT C Aug. 26, 2018, 10:33 a.m. OK FPC TESTS 50 31 1433600 1600
41869950 aniket.shrimal C Aug. 19, 2018, 6:06 p.m. OK GNU C TESTS 50 31 102400 1600
41859701 Imy_Bo C Aug. 19, 2018, 3:22 p.m. OK GNU C++ TESTS 50 30 102400 1600
42327522 rocky_mars C Sept. 1, 2018, 7:09 a.m. OK GNU C++ TESTS 50 30 716800 1600
41898642 luogu_bot4 C Aug. 20, 2018, 10:59 a.m. OK GNU C++ TESTS 50 30 3072000 1600
42422148 vjudge3 C Sept. 3, 2018, 10:52 a.m. OK GNU C++ TESTS 50 31 0 1600
42335121 vjudge5 C Sept. 1, 2018, 1:20 p.m. OK GNU C++ TESTS 50 31 0 1600
42258435 Joky_02 C Aug. 30, 2018, 12:33 a.m. OK GNU C++ TESTS 50 31 0 1600
42136692 wjyyy C Aug. 27, 2018, 12:49 a.m. OK GNU C++ TESTS 50 31 0 1600
42110264 BUAAduhao C Aug. 26, 2018, 5:25 a.m. OK GNU C++ TESTS 50 31 0 1600
42107084 vjudge3 C Aug. 26, 2018, 2:07 a.m. OK GNU C++ TESTS 50 31 0 1600
42105427 vjudge2 C Aug. 25, 2018, 11:38 p.m. OK GNU C++ TESTS 50 31 0 1600
47322909 vjudge2 C Dec. 21, 2018, 8:47 a.m. OK GNU C11 TESTS 50 31 102400 1600
47034350 vjudge5 C Dec. 15, 2018, 11:31 a.m. OK GNU C11 TESTS 50 31 102400 1600
47103341 vjudge2 C Dec. 16, 2018, 11:47 a.m. OK GNU C11 TESTS 50 31 204800 1600
48439653 vjudge5 C Jan. 16, 2019, 1:37 a.m. OK GNU C11 TESTS 50 31 204800 1600
47875162 longjuanfeng C Jan. 3, 2019, 2:58 p.m. OK GNU C11 TESTS 50 31 204800 1600
47868110 vjudge2 C Jan. 3, 2019, 11:10 a.m. OK GNU C11 TESTS 50 31 204800 1600
47841482 vjudge3 C Jan. 2, 2019, 12:14 p.m. OK GNU C11 TESTS 50 31 204800 1600
47332652 vjudge5 C Dec. 21, 2018, 1:39 p.m. OK GNU C11 TESTS 50 31 204800 1600
47287732 vjudge3 C Dec. 20, 2018, 7:17 a.m. OK GNU C11 TESTS 50 31 204800 1600
47160506 vjudge5 C Dec. 17, 2018, 9:33 a.m. OK GNU C11 TESTS 50 31 204800 1600
47548488 vjudge2 C Dec. 27, 2018, 11:40 a.m. OK GNU C++11 TESTS 50 30 0 1600
59275171 vjudge2 C Aug. 22, 2019, 2:21 p.m. OK GNU C++11 TESTS 50 30 204800 1600
51019026 vjudge4 C March 8, 2019, 10:41 a.m. OK GNU C++11 TESTS 50 30 204800 1600
42267847 eighthundred C Aug. 30, 2018, 6:22 a.m. OK GNU C++11 TESTS 50 30 307200 1600
41881249 2016211267 C Aug. 20, 2018, 1:40 a.m. OK GNU C++11 TESTS 50 30 307200 1600
42019072 ccx13 C Aug. 24, 2018, 8:04 a.m. OK GNU C++11 TESTS 50 30 512000 1600
41939968 luogu_bot3 C Aug. 21, 2018, 2:49 p.m. OK GNU C++11 TESTS 50 30 1024000 1600
42017095 redbag C Aug. 24, 2018, 6:57 a.m. OK GNU C++11 TESTS 50 30 1024000 1600
42322772 RNS_MHB C Sept. 1, 2018, 12:30 a.m. OK GNU C++11 TESTS 50 30 1126400 1600
41879458 Amprbo C Aug. 20, 2018, 12:20 a.m. OK GNU C++11 TESTS 50 30 1331200 1600
42003938 __Melodies C Aug. 23, 2018, 5:05 p.m. OK GNU C++14 TESTS 50 15 307200 1600
42064795 Superty C Aug. 24, 2018, 6:56 p.m. OK GNU C++14 TESTS 50 15 307200 1600
52539583 GeorgeRaouf C April 9, 2019, 5:21 p.m. OK GNU C++14 TESTS 50 15 1126400 1600
41879642 fjfjfj759088 C Aug. 20, 2018, 12:31 a.m. OK GNU C++14 TESTS 50 30 102400 1600
47504123 code_name123 C Dec. 25, 2018, 8:29 p.m. OK GNU C++14 TESTS 50 30 102400 1600
41882449 Soror_Tina C Aug. 20, 2018, 2:07 a.m. OK GNU C++14 TESTS 50 30 102400 1600
61960721 Helman C Oct. 6, 2019, 7:23 a.m. OK GNU C++14 TESTS 50 30 204800 1600
41952783 dafeng C Aug. 22, 2018, 3:19 a.m. OK GNU C++14 TESTS 50 30 204800 1600
60401751 yell0wfl4sh C Sept. 11, 2019, 4:57 p.m. OK GNU C++14 TESTS 50 30 307200 1600
63091963 RedNextCentury C Oct. 21, 2019, 6:50 p.m. OK GNU C++14 TESTS 50 30 307200 1600
41891082 HanaYukii C Aug. 20, 2018, 7:09 a.m. OK GNU C++17 TESTS 50 15 307200 1600
41875451 Akel C Aug. 19, 2018, 8:35 p.m. OK GNU C++17 TESTS 50 15 819200 1600
45410245 Sun_For_Life C Nov. 7, 2018, 11:45 a.m. OK GNU C++17 TESTS 50 15 819200 1600
41879413 congmingyige C Aug. 20, 2018, 12:17 a.m. OK GNU C++17 TESTS 50 30 102400 1600
41872312 rebecacalazans C Aug. 19, 2018, 6:54 p.m. OK GNU C++17 TESTS 50 30 102400 1600
41861266 anpans C Aug. 19, 2018, 3:30 p.m. OK GNU C++17 TESTS 50 30 102400 1600
41981551 XzzF C Aug. 23, 2018, 2:08 a.m. OK GNU C++17 TESTS 50 30 204800 1600
42019248 demor C Aug. 24, 2018, 8:11 a.m. OK GNU C++17 TESTS 50 30 204800 1600
47441325 vjudge3 C Dec. 24, 2018, 1:28 a.m. OK GNU C++17 TESTS 50 30 204800 1600
56639459 wery0 C July 6, 2019, 11:24 p.m. OK GNU C++17 TESTS 50 30 307200 1600
41858075 tusupov C Aug. 19, 2018, 3:12 p.m. OK Go TESTS 50 31 1331200 1600
42288943 Maaddy C Aug. 30, 2018, 7:13 p.m. OK Java 8 TESTS 50 124 0 1600
66830841 lazypanda C Dec. 14, 2019, 10:08 a.m. OK Java 8 TESTS 50 124 0 1600
53874931 zmurzagaliev C May 8, 2019, 11:31 a.m. OK Java 8 TESTS 50 124 0 1600
46829824 jey.inc C Dec. 9, 2018, 9:08 p.m. OK Java 8 TESTS 50 124 0 1600
46626910 kusomushi C Dec. 4, 2018, 9:46 p.m. OK Java 8 TESTS 50 124 0 1600
45591158 mandark27 C Nov. 12, 2018, 12:34 p.m. OK Java 8 TESTS 50 124 0 1600
44832459 donli C Oct. 25, 2018, 9:08 a.m. OK Java 8 TESTS 50 124 0 1600
44494093 sooraj10 C Oct. 18, 2018, 3:56 p.m. OK Java 8 TESTS 50 124 0 1600
41950881 Intrincantation C Aug. 22, 2018, 1:12 a.m. OK Java 8 TESTS 50 124 0 1600
41938582 devjr C Aug. 21, 2018, 2:06 p.m. OK Java 8 TESTS 50 124 0 1600
52074681 nemars C March 31, 2019, 9:25 a.m. OK Mono C# TESTS 50 46 307200 1600
41866851 YouAreTheBest C Aug. 19, 2018, 5:21 p.m. OK Mono C# TESTS 50 46 716800 1600
41907467 mrthannn C Aug. 20, 2018, 3:27 p.m. OK Mono C# TESTS 50 46 716800 1600
41898267 fr0st C Aug. 20, 2018, 10:47 a.m. OK Mono C# TESTS 50 46 34816000 1600
42308307 Alex_PKZDL C Aug. 31, 2018, 12:41 p.m. OK Mono C# TESTS 50 62 4710400 1600
56161889 og.kostya C June 27, 2019, 12:40 p.m. OK Mono C# TESTS 50 62 5427200 1600
42114452 nomiku99 C Aug. 26, 2018, 8:37 a.m. OK MS C++ TESTS 50 30 614400 1600
64457431 kisekiii C Nov. 7, 2019, 9:10 a.m. OK MS C++ TESTS 50 31 102400 1600
47335546 vjudge2 C Dec. 21, 2018, 2:56 p.m. OK MS C++ TESTS 50 31 102400 1600
41859359 yuzhibo C Aug. 19, 2018, 3:20 p.m. OK MS C++ TESTS 50 31 102400 1600
64457531 vjudge1 C Nov. 7, 2019, 9:12 a.m. OK MS C++ TESTS 50 31 102400 1600
64457491 vjudge4 C Nov. 7, 2019, 9:11 a.m. OK MS C++ TESTS 50 31 102400 1600
69952493 vjudge5 C Feb. 1, 2020, 9:19 a.m. OK MS C++ TESTS 50 31 204800 1600
54165758 vjudge2 C May 15, 2019, 8:38 a.m. OK MS C++ TESTS 50 31 204800 1600
54165557 vjudge5 C May 15, 2019, 8:32 a.m. OK MS C++ TESTS 50 31 204800 1600
54165440 vjudge3 C May 15, 2019, 8:29 a.m. OK MS C++ TESTS 50 31 204800 1600
59233954 Still_Theory C Aug. 21, 2019, 4:38 p.m. OK MS C++ 2017 TESTS 50 31 204800 1600
61261179 vjudge5 C Sept. 25, 2019, 11:38 a.m. OK MS C++ 2017 TESTS 50 31 204800 1600
64747328 vjudge1 C Nov. 12, 2019, 1:59 p.m. OK MS C++ 2017 TESTS 50 31 204800 1600
62673756 AleksanderBalobanov C Oct. 16, 2019, 10:45 a.m. OK MS C++ 2017 TESTS 50 46 307200 1600
64459070 vjudge5 C Nov. 7, 2019, 9:41 a.m. OK MS C++ 2017 TESTS 50 46 307200 1600
56515966 st1vdy C July 4, 2019, 12:43 p.m. OK MS C++ 2017 TESTS 50 46 614400 1600
45502882 KGYYT C Nov. 10, 2018, 8:39 a.m. OK PascalABC.NET TESTS 50 46 0 1600
43717949 mayakin C Oct. 3, 2018, 8:25 a.m. OK PHP TESTS 50 46 409600 1600
41985167 supachai_pay C Aug. 23, 2018, 5:33 a.m. OK PyPy 2 TESTS 50 124 614400 1600
41876136 aeternalis1 C Aug. 19, 2018, 9:02 p.m. OK PyPy 2 TESTS 50 124 2764800 1600
42414652 anshuman16423 C Sept. 3, 2018, 6:19 a.m. OK PyPy 2 TESTS 50 140 716800 1600
43258306 SerChirag C Sept. 22, 2018, 2:05 p.m. OK PyPy 2 TESTS 50 140 819200 1600
41863556 fortmax120 C Aug. 19, 2018, 3:43 p.m. OK PyPy 2 TESTS 50 140 1024000 1600
41860052 Onesh0t C Aug. 19, 2018, 3:24 p.m. OK PyPy 2 TESTS 50 140 6348800 1600
41986124 akshay125 C Aug. 23, 2018, 6:13 a.m. OK PyPy 2 TESTS 50 155 716800 1600
60402101 ssk497 C Sept. 11, 2019, 5:05 p.m. OK PyPy 2 TESTS 50 218 9625600 1600
52641047 hrustim25 C April 12, 2019, 12:28 p.m. OK PyPy 3 TESTS 50 140 1228800 1600
45446258 omarnvidia C Nov. 8, 2018, 1:34 p.m. OK PyPy 3 TESTS 50 140 1433600 1600
41899005 bortoz C Aug. 20, 2018, 11:09 a.m. OK PyPy 3 TESTS 50 140 1433600 1600
41858191 titia C Aug. 19, 2018, 3:13 p.m. OK PyPy 3 TESTS 50 155 1024000 1600
61251882 kopok2 C Sept. 25, 2019, 8:36 a.m. OK PyPy 3 TESTS 50 155 2457600 1600
60712918 alexara1123 C Sept. 17, 2019, 9:15 a.m. OK PyPy 3 TESTS 50 155 5836800 1600
41968228 AbduSharif C Aug. 22, 2018, 1:30 p.m. OK PyPy 3 TESTS 50 155 7065600 1600
41960414 fascineted C Aug. 22, 2018, 9:05 a.m. OK PyPy 3 TESTS 50 156 1433600 1600
61959212 abreddy C Oct. 6, 2019, 6:55 a.m. OK PyPy 3 TESTS 50 156 4915200 1600
41972752 wadissimo C Aug. 22, 2018, 4:16 p.m. OK PyPy 3 TESTS 50 171 1331200 1600
41912090 anitocode C Aug. 20, 2018, 6:34 p.m. OK Python 2 TESTS 50 217 2150400 1600
41950594 wangkan2001 C Aug. 22, 2018, 12:43 a.m. OK Python 2 TESTS 50 218 3788800 1600
41874535 asfd221 C Aug. 19, 2018, 8:02 p.m. OK Python 2 TESTS 50 233 9830400 1600
60268888 soumyasarkar1998 C Sept. 8, 2019, 2:34 p.m. OK Python 2 TESTS 50 249 5017600 1600
42133304 kakkarotssj C Aug. 26, 2018, 8:39 p.m. OK Python 2 TESTS 50 249 7577600 1600
41875602 fat-fighter C Aug. 19, 2018, 8:41 p.m. OK Python 2 TESTS 50 264 2662400 1600
41941429 Butane C Aug. 21, 2018, 3:43 p.m. OK Python 2 TESTS 50 295 1024000 1600
42670417 REILX C Sept. 8, 2018, 10:37 a.m. OK Python 2 TESTS 50 326 4403200 1600
64175867 IngaleAnkur10 C Nov. 3, 2019, 8:49 p.m. OK Python 3 TESTS 50 124 204800 1600
41976124 orailly C Aug. 22, 2018, 6:59 p.m. OK Python 3 TESTS 50 139 204800 1600
42112370 gaurav_pandey C Aug. 26, 2018, 7:03 a.m. OK Python 3 TESTS 50 155 921600 1600
41948652 gaurav_pandey C Aug. 21, 2018, 9:22 p.m. OK Python 3 TESTS 50 155 921600 1600
41871658 ulyabelyaeva C Aug. 19, 2018, 6:42 p.m. OK Python 3 TESTS 50 155 1331200 1600
41861394 tanmay28 C Aug. 19, 2018, 3:31 p.m. OK Python 3 TESTS 50 171 204800 1600
41947995 knighthawk C Aug. 21, 2018, 8:32 p.m. OK Python 3 TESTS 50 171 307200 1600
41866679 shado_w C Aug. 19, 2018, 5:19 p.m. OK Python 3 TESTS 50 186 204800 1600
58093704 LintuStorm C July 31, 2019, 6:41 p.m. OK Python 3 TESTS 50 186 512000 1600
42067329 indianfootball C Aug. 24, 2018, 8:33 p.m. OK Python 3 TESTS 50 187 409600 1600
42838628 yakamoto C Sept. 13, 2018, 5:11 p.m. OK Scala TESTS 50 483 0 1600
41867155 limed C Aug. 19, 2018, 5:24 p.m. OK Scala TESTS 50 514 0 1600

remove filters

Back to search problems