Codeforces Round 555 (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
1157 Codeforces Round 555 (Div. 3) FINISHED False 7200 175533899 April 26, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8065 ) C2 Increasing Subsequence (hard version) PROGRAMMING greedy 1700

B"The only difference between problems C1 and C2 is that all values in input of problem C1 are distinct (this condition may be false for problem C2). You are given a sequence a consisting of n integers. You are making a sequence of moves. During each move you must take either the leftmost element of the sequence or the rightmost element of the sequence, write it down and remove it from the sequence. Your task is to write down a strictly increasing sequence, and among all such sequences you should take the longest (the length of the sequence is the number of elements in it). For example, for the sequence [1, 2, 4, 3, 2] the answer is 4 (you take 1 and the sequence becomes [2, 4, 3, 2] , then you take the rightmost element 2 and the sequence becomes [2, 4, 3] , then you take 3 and the sequence becomes [2, 4] and then you take 4 and the sequence becomes [2] , the obtained increasing sequence is [1, 2, 3, 4] ). The first line of the input contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of elements in a . The second line of the input contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 2 cdot 10^5 ), where a_i is the i -th element of a . In the first line of the output print k -- the maximum number of elements in a strictly increasing sequence you can obtain. In the second line print a string s of length k , where the j -th character of this string s_j should be 'L' if you take the leftmost element during the j -th move and 'R' otherwise. If there are multiple answers, you can print any. The first example is described in the problem statement. "...

Tutorials

66737

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
57830160 murch C2 July 27, 2019, 5:45 a.m. OK Clang++17 Diagnostics TESTS 252 811 15974400 1700
53884957 HQT2003 C2 May 8, 2019, 5:25 p.m. OK FPC TESTS 252 62 8704000 1700
53481539 Roka C2 April 28, 2019, 8:33 p.m. OK GNU C11 TESTS 252 46 1024000 1700
54789947 MinQ C2 May 29, 2019, 6:36 a.m. OK GNU C11 TESTS 252 46 1024000 1700
53490607 Felix555 C2 April 29, 2019, 8:22 a.m. OK GNU C11 TESTS 252 61 1843200 1700
54471996 geekotechy C2 May 22, 2019, 6:05 a.m. OK GNU C11 TESTS 252 62 1024000 1700
53967191 about C2 May 10, 2019, 6:08 p.m. OK GNU C11 TESTS 252 624 819200 1700
53780282 aj4941 C2 May 5, 2019, 8:52 a.m. OK GNU C11 TESTS 252 1232 2560000 1700
69475844 lonely_person C2 Jan. 24, 2020, 4:08 p.m. OK GNU C++11 TESTS 252 31 819200 1700
54280138 llyc C2 May 17, 2019, 12:59 p.m. OK GNU C++11 TESTS 252 31 1024000 1700
55610967 ReaLNero1 C2 June 16, 2019, 5:41 a.m. OK GNU C++11 TESTS 252 31 1024000 1700
58221319 Frame233 C2 Aug. 3, 2019, 12:39 p.m. OK GNU C++11 TESTS 252 31 1024000 1700
61925784 1607679658z C2 Oct. 5, 2019, 2:35 p.m. OK GNU C++11 TESTS 252 31 1024000 1700
53568730 Naive_Cat C2 April 30, 2019, 1:56 p.m. OK GNU C++11 TESTS 252 31 1331200 1700
61884082 _Teemo C2 Oct. 5, 2019, 2:21 a.m. OK GNU C++11 TESTS 252 31 1433600 1700
54372788 SoiMae C2 May 19, 2019, 7:23 a.m. OK GNU C++11 TESTS 252 31 1638400 1700
59558457 chenyewei_1234 C2 Aug. 27, 2019, 7:20 a.m. OK GNU C++11 TESTS 252 31 1843200 1700
58854812 AyoAyowei C2 Aug. 15, 2019, 8:53 a.m. OK GNU C++11 TESTS 252 31 2150400 1700
53946327 vishnu_m C2 May 10, 2019, 6:54 a.m. OK GNU C++14 TESTS 252 46 1228800 1700
53532664 GusMG C2 April 29, 2019, 9:57 p.m. OK GNU C++14 TESTS 252 46 1331200 1700
53607276 tokitsukaze C2 May 1, 2019, 11:05 a.m. OK GNU C++14 TESTS 252 46 1433600 1700
55307941 SalePark C2 June 8, 2019, 3:41 p.m. OK GNU C++14 TESTS 252 46 1433600 1700
54780609 Abdelrhman_Akram C2 May 28, 2019, 9:17 p.m. OK GNU C++14 TESTS 252 46 1536000 1700
53713706 manu C2 May 3, 2019, 5:21 p.m. OK GNU C++14 TESTS 252 46 2764800 1700
53827040 seo C2 May 6, 2019, 4:53 p.m. OK GNU C++14 TESTS 252 46 3481600 1700
53974208 vjudge4 C2 May 11, 2019, 2:24 a.m. OK GNU C++14 TESTS 252 61 1024000 1700
54347396 vjudge3 C2 May 18, 2019, 1:07 p.m. OK GNU C++14 TESTS 252 61 1024000 1700
53568118 daniel071292 C2 April 30, 2019, 1:36 p.m. OK GNU C++14 TESTS 252 61 1024000 1700
53796006 .tx C2 May 5, 2019, 3:20 p.m. OK GNU C++17 TESTS 252 31 1331200 1700
53484426 nickluo C2 April 29, 2019, 1:22 a.m. OK GNU C++17 TESTS 252 31 3481600 1700
57616321 Mamba0Z C2 July 24, 2019, 1:46 a.m. OK GNU C++17 TESTS 252 46 1024000 1700
53481542 Roka C2 April 28, 2019, 8:33 p.m. OK GNU C++17 TESTS 252 46 1024000 1700
54024230 2bcn C2 May 12, 2019, 11:36 a.m. OK GNU C++17 TESTS 252 46 1536000 1700
53826757 Dalgerok C2 May 6, 2019, 4:40 p.m. OK GNU C++17 TESTS 252 46 1638400 1700
67064809 chirag7145 C2 Dec. 17, 2019, 10:40 a.m. OK GNU C++17 TESTS 252 46 1638400 1700
58225904 Saurabh303 C2 Aug. 3, 2019, 2:27 p.m. OK GNU C++17 TESTS 252 46 1843200 1700
56052711 DEKU_ C2 June 25, 2019, 8:14 p.m. OK GNU C++17 TESTS 252 46 2457600 1700
60944336 Late_Night C2 Sept. 20, 2019, 6:16 p.m. OK GNU C++17 TESTS 252 46 2457600 1700
63926479 Clowyy C2 Oct. 31, 2019, 1:09 p.m. OK Java 11 TESTS 252 264 4812800 1700
56043152 dyhu083 C2 June 25, 2019, 3:16 p.m. OK Java 8 TESTS 252 124 0 1700
65336887 bluesky111 C2 Nov. 19, 2019, 9:16 a.m. OK Java 8 TESTS 252 124 0 1700
55219544 cribabby C2 June 6, 2019, 6:41 p.m. OK Java 8 TESTS 252 124 0 1700
54252513 In_The_Name_Of_Love C2 May 16, 2019, 6:01 p.m. OK Java 8 TESTS 252 124 0 1700
53612734 vivek_23 C2 May 1, 2019, 1:59 p.m. OK Java 8 TESTS 252 124 0 1700
53483877 Lior C2 April 29, 2019, 12:18 a.m. OK Java 8 TESTS 252 124 0 1700
55580303 amolpratap007 C2 June 15, 2019, 6:13 a.m. OK Java 8 TESTS 252 139 0 1700
53750569 hasan5788 C2 May 4, 2019, 5:27 p.m. OK Java 8 TESTS 252 140 0 1700
59423663 adamjamil C2 Aug. 24, 2019, 11:45 p.m. OK Java 8 TESTS 252 140 2355200 1700
53878425 abhi2601 C2 May 8, 2019, 1:18 p.m. OK Java 8 TESTS 252 155 0 1700
53508859 Vest. C2 April 29, 2019, 2:55 p.m. OK JavaScript TESTS 252 218 31436800 1700
59675747 MathAlex C2 Aug. 29, 2019, 6:03 p.m. OK Kotlin TESTS 252 296 15462400 1700
57927579 Spheniscine C2 July 29, 2019, 7:38 a.m. OK Kotlin TESTS 252 311 15564800 1700
57927523 Spheniscine C2 July 29, 2019, 7:37 a.m. OK Kotlin TESTS 252 312 15564800 1700
56723400 sekti C2 July 8, 2019, 6:06 p.m. OK Kotlin TESTS 252 327 15462400 1700
59710521 rego97 C2 Aug. 30, 2019, 2:29 p.m. OK Kotlin TESTS 252 327 15564800 1700
53493743 dmitru C2 April 29, 2019, 10:29 a.m. OK Mono C# TESTS 252 93 16179200 1700
53810753 Salatik231166 C2 May 6, 2019, 6:30 a.m. OK Mono C# TESTS 252 108 16179200 1700
59212142 treasuryonly C2 Aug. 21, 2019, 8:54 a.m. OK Mono C# TESTS 252 124 17305600 1700
62100583 nadilk C2 Oct. 8, 2019, 8:59 a.m. OK Mono C# TESTS 252 139 21094400 1700
55073786 og.kostya C2 June 4, 2019, 7:34 a.m. OK Mono C# TESTS 252 140 6860800 1700
54507945 scorpiowf C2 May 23, 2019, 5:23 a.m. OK MS C++ TESTS 252 46 1024000 1700
53983027 vjudge4 C2 May 11, 2019, 8:10 a.m. OK MS C++ TESTS 252 46 1024000 1700
53810407 vjudge1 C2 May 6, 2019, 6:11 a.m. OK MS C++ TESTS 252 46 1024000 1700
61689510 vjudge2 C2 Oct. 2, 2019, 5:14 a.m. OK MS C++ TESTS 252 61 1024000 1700
61788486 vjudge5 C2 Oct. 3, 2019, 3:09 p.m. OK MS C++ TESTS 252 61 1433600 1700
63062591 vjudge1 C2 Oct. 21, 2019, 9:20 a.m. OK MS C++ TESTS 252 61 1843200 1700
61787678 vjudge5 C2 Oct. 3, 2019, 2:55 p.m. OK MS C++ TESTS 252 62 1024000 1700
60755477 vjudge3 C2 Sept. 18, 2019, 8:39 a.m. OK MS C++ TESTS 252 62 1024000 1700
55302500 vjudge1 C2 June 8, 2019, 12:38 p.m. OK MS C++ TESTS 252 62 1024000 1700
53874829 vjudge4 C2 May 8, 2019, 11:28 a.m. OK MS C++ TESTS 252 62 1024000 1700
56537470 2465806616 C2 July 5, 2019, 2:16 a.m. OK MS C++ 2017 TESTS 252 62 1024000 1700
56273238 xsc C2 June 29, 2019, 1 p.m. OK MS C++ 2017 TESTS 252 78 1331200 1700
53701323 aptxdcy C2 May 3, 2019, 10:37 a.m. OK MS C++ 2017 TESTS 252 78 1638400 1700
53493675 risa243 C2 April 29, 2019, 10:26 a.m. OK MS C++ 2017 TESTS 252 78 2252800 1700
53600019 lys013 C2 May 1, 2019, 7:06 a.m. OK MS C++ 2017 TESTS 252 93 1024000 1700
53527315 CtrlAlt C2 April 29, 2019, 4:49 p.m. OK MS C++ 2017 TESTS 252 108 1331200 1700
69528869 HishamDroubi C2 Jan. 25, 2020, 4:14 p.m. OK MS C++ 2017 TESTS 252 155 1433600 1700
53587528 shivgarg C2 April 30, 2019, 7:40 p.m. OK MS C++ 2017 TESTS 252 156 1024000 1700
53481833 very_incredible C2 April 28, 2019, 8:51 p.m. OK MS C++ 2017 TESTS 252 156 1024000 1700
53607129 moreda C2 May 1, 2019, 11 a.m. OK MS C++ 2017 TESTS 252 156 1228800 1700
53924747 mayakin C2 May 9, 2019, 4:29 p.m. OK PHP TESTS 252 139 16384000 1700
53479824 alexwice C2 April 28, 2019, 6:41 p.m. OK PyPy 2 TESTS 252 248 13824000 1700
58671970 ssk497 C2 Aug. 12, 2019, 2:47 p.m. OK PyPy 2 TESTS 252 249 17920000 1700
53854150 gatsko C2 May 7, 2019, 3:07 p.m. OK PyPy 2 TESTS 252 264 20172800 1700
53900496 pmarecki C2 May 9, 2019, 8:49 a.m. OK PyPy 3 TESTS 252 249 18124800 1700
53712475 d3dx10 C2 May 3, 2019, 4:23 p.m. OK PyPy 3 TESTS 252 249 18227200 1700
54479744 bupt.wc C2 May 22, 2019, 10:27 a.m. OK PyPy 3 TESTS 252 264 18227200 1700
64714517 Aloha C2 Nov. 11, 2019, 8:49 p.m. OK PyPy 3 TESTS 252 342 20889600 1700
55970944 fezjo C2 June 23, 2019, 2:45 p.m. OK PyPy 3 TESTS 252 358 16076800 1700
53692296 gaurav007_ C2 May 3, 2019, 5:43 a.m. OK PyPy 3 TESTS 252 373 18124800 1700
56069245 koptev C2 June 26, 2019, 9:32 a.m. OK PyPy 3 TESTS 252 373 18636800 1700
53888769 tarush C2 May 8, 2019, 8:49 p.m. OK PyPy 3 TESTS 252 374 18124800 1700
55762732 Felerius C2 June 19, 2019, 3:07 p.m. OK PyPy 3 TESTS 252 451 18841600 1700
53493581 vjudge2 C2 April 29, 2019, 10:23 a.m. OK Python 2 TESTS 252 420 11980800 1700
53527721 smirnovalX C2 April 29, 2019, 5:22 p.m. OK Python 2 TESTS 252 577 12083200 1700
54900646 soumyasarkar1998 C2 June 1, 2019, 6:24 a.m. OK Python 2 TESTS 252 1341 11161600 1700
53964270 Arhimason C2 May 10, 2019, 3:57 p.m. OK Python 3 TESTS 252 265 14336000 1700
68988249 Gaurav1 C2 Jan. 17, 2020, 1:17 p.m. OK Python 3 TESTS 252 280 13824000 1700
53719903 praveen.123 C2 May 3, 2019, 9:44 p.m. OK Python 3 TESTS 252 296 14131200 1700
53864960 ahManoTravei C2 May 8, 2019, 2:30 a.m. OK Python 3 TESTS 252 296 14233600 1700
53689592 NamTran C2 May 3, 2019, 3:43 a.m. OK Python 3 TESTS 252 311 13824000 1700
53530741 peitl C2 April 29, 2019, 8:04 p.m. OK Python 3 TESTS 252 311 14438400 1700
54969247 rationalkunal C2 June 2, 2019, 7:51 a.m. OK Python 3 TESTS 252 311 14643200 1700
53703896 Axyzv C2 May 3, 2019, 12:11 p.m. OK Python 3 TESTS 252 312 13312000 1700
53550098 louisdo15111999 C2 April 30, 2019, 8:17 a.m. OK Python 3 TESTS 252 312 13824000 1700
53789096 Lancern C2 May 5, 2019, 11:50 a.m. OK Python 3 TESTS 252 312 14643200 1700

remove filters

Back to search problems