VK Cup 2015 - Round 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
524 VK Cup 2015 - Round 1 FINISHED False 7200 310233563 March 21, 2015, 2 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 542 ) F And Yet Another Bracket Sequence PROGRAMMING data structures greedy hashing string suffix structures strings 2700

B'Polycarpus has a finite sequence of opening and closing brackets. In order not to fall asleep in a lecture, Polycarpus is having fun with his sequence. He is able to perform two operations: Polycarpus can apply any number of operations to his sequence and adding a cyclic shift in any order. As a result, he wants to get the correct bracket sequence of the minimum possible length. If there are several such sequences, Polycarpus is interested in the lexicographically smallest one. Help him find such a sequence. Acorrect bracket sequence is a sequence of opening and closing brackets, from which you can get a correct arithmetic expression by adding characters "1" and "+" . Each opening bracket must correspond to a closed one. For example, the sequences "(())()", "()", "(()(()))" are correct and ")(", "(()" and "(()))(" are not. The sequence a1 a2... an is lexicographically smaller than sequence b1 b2... bn, if there is such number i from 1 to n, thatak xe2 x80 x89= xe2 x80 x89bk for 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89< xe2 x80 x89i and ai xe2 x80 x89< xe2 x80 x89bi. Consider that "(" xe2 x80 x89< xe2 x80 x89 ")". The first line contains Polycarpus 's sequence consisting of characters "(" and ")". The length of a line is from 1 to 1 xe2 x80 x89000 xe2 x80 x89000. Print a correct bracket sequence of the minimum length that Polycarpus can obtain by his operations. If there are multiple such sequences, print the lexicographically minimum one. The sequence in the first example is already correct, but to get the lexicographically minimum answer, you need to perform four cyclic shift operations. In the second example you need to add a closing parenthesis between the second and third brackets and make a cyclic shift. You can first make the shift, and then add the bracket at the end.'...

Tutorials

VK Cup Round 1 (+ online mirror) editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
10559568 vjudge5 F April 3, 2015, 11:54 a.m. OK FPC TESTS 39 4242 43622400 2700
10557329 ez_cjb F April 3, 2015, 6:44 a.m. OK FPC TESTS 39 4586 43622400 2700
10388759 Alex_2oo8 F March 21, 2015, 8:16 p.m. OK FPC TESTS 39 4945 65843200 2700
28279356 lllllllllllllllllllllll F July 4, 2017, 11:52 a.m. OK GNU C++ TESTS 39 46 67072000 2700
41586120 foreverpiano F Aug. 14, 2018, 11:20 a.m. OK GNU C++ TESTS 39 78 50073600 2700
10916952 zeye F April 28, 2015, 9:12 a.m. OK GNU C++ TESTS 39 187 9728000 2700
10412279 krijgertje F March 23, 2015, 4:03 p.m. OK GNU C++ TESTS 39 327 210944000 2700
10382465 enot110 -XraY- F March 21, 2015, 3:17 p.m. OK GNU C++ TESTS 39 390 92979200 2700
13619438 TankEngineer F Oct. 15, 2015, 11:30 a.m. OK GNU C++ TESTS 39 499 32665600 2700
10401760 osmanorhan F March 22, 2015, 2:43 p.m. OK GNU C++ TESTS 39 560 84992000 2700
10388816 Edvard F March 21, 2015, 8:21 p.m. OK GNU C++ TESTS 39 561 78233600 2700
10617374 skywalkert F April 7, 2015, 12:48 a.m. OK GNU C++ TESTS 39 608 28876800 2700
28303932 pyop F July 5, 2017, 12:37 p.m. OK GNU C++ TESTS 39 701 84275200 2700
10457039 Chortos-2 F March 26, 2015, 12:21 p.m. OK GNU C++11 TESTS 39 31 4812800 2700
11080868 ShingRay F May 12, 2015, 5:59 p.m. OK GNU C++11 TESTS 39 31 9830400 2700
10435949 Chortos-2 F March 25, 2015, 11:45 a.m. OK GNU C++11 TESTS 39 31 13824000 2700
10434226 Chortos-2 F March 25, 2015, 11:09 a.m. OK GNU C++11 TESTS 39 31 15872000 2700
11080862 ShingRay F May 12, 2015, 5:58 p.m. OK GNU C++11 TESTS 39 46 9830400 2700
40986882 ReaLNero1 F July 30, 2018, 8:49 p.m. OK GNU C++11 TESTS 39 46 13824000 2700
57818055 py_ultron F July 26, 2019, 8:55 p.m. OK GNU C++11 TESTS 39 46 20070400 2700
46022994 tritanngo99 F Nov. 21, 2018, 9:18 a.m. OK GNU C++11 TESTS 39 46 29900800 2700
57886282 lopare F July 28, 2019, 10:03 a.m. OK GNU C++11 TESTS 39 61 20070400 2700
10425620 hellman_ F March 24, 2015, 5:44 p.m. OK GNU C++11 TESTS 39 62 20070400 2700
28210597 zhouyuyang F July 2, 2017, 12:53 p.m. OK GNU C++14 TESTS 39 124 22016000 2700
59344963 emoairx F Aug. 23, 2019, 9:16 a.m. OK GNU C++14 TESTS 39 124 26009600 2700
35885416 ______n______ F March 3, 2018, 1:28 p.m. OK GNU C++14 TESTS 39 139 21913600 2700
35884576 _____k_____ F March 3, 2018, 1:15 p.m. OK GNU C++14 TESTS 39 139 21913600 2700
35884348 _____i_____ F March 3, 2018, 1:09 p.m. OK GNU C++14 TESTS 39 139 21913600 2700
35873869 ______h______ F March 3, 2018, 7:40 a.m. OK GNU C++14 TESTS 39 139 21913600 2700
35873669 ______k______ F March 3, 2018, 7:35 a.m. OK GNU C++14 TESTS 39 139 21913600 2700
35873069 ______i______ F March 3, 2018, 7:23 a.m. OK GNU C++14 TESTS 39 139 21913600 2700
35871231 ______M______ F March 3, 2018, 6:46 a.m. OK GNU C++14 TESTS 39 139 21913600 2700
49765203 ugly2333 F Feb. 11, 2019, 11:20 a.m. OK GNU C++14 TESTS 39 842 72089600 2700
62448373 Kuroni F Oct. 13, 2019, 1:59 a.m. OK GNU C++17 TESTS 39 436 46489600 2700
44831713 .I. F Oct. 25, 2018, 8:46 a.m. OK GNU C++17 TESTS 39 436 77004800 2700
44831627 .I. F Oct. 25, 2018, 8:44 a.m. OK GNU C++17 TESTS 39 452 76800000 2700
41599413 platypus179 F Aug. 14, 2018, 6:50 p.m. OK GNU C++17 TESTS 39 935 42496000 2700
51798691 lis F March 24, 2019, 4:45 p.m. OK GNU C++17 TESTS 39 1840 45056000 2700
59329705 ivan100sic F Aug. 22, 2019, 11:44 p.m. OK GNU C++17 TESTS 39 2791 142438400 2700
49777303 vjudge5 F Feb. 11, 2019, 4:01 p.m. OK GNU C++17 TESTS 39 3743 136806400 2700
64339766 hjk1030 F Nov. 6, 2019, 1:34 a.m. OK GNU C++17 TESTS 39 3914 218419200 2700
63544698 ruo F Oct. 27, 2019, 10:14 a.m. OK GNU C++17 TESTS 39 4024 210432000 2700
44829792 .I. F Oct. 25, 2018, 7:56 a.m. OK GNU C++17 TESTS 39 4617 46899200 2700
10382494 qwerty787788 subscriber F March 21, 2015, 3:18 p.m. OK Java 8 TESTS 39 1060 57958400 2700
12099398 qwerty787788 F July 17, 2015, 10:35 p.m. OK Java 8 TESTS 39 1185 58675200 2700
12099378 qwerty787788 F July 17, 2015, 10:28 p.m. OK Java 8 TESTS 39 1232 58675200 2700
12099380 qwerty787788 F July 17, 2015, 10:29 p.m. OK Java 8 TESTS 39 1918 58675200 2700
10388203 mmaxio F March 21, 2015, 7:40 p.m. OK Java 8 TESTS 39 2339 27648000 2700
10389145 mmaxio F March 21, 2015, 8:51 p.m. OK Java 8 TESTS 39 2432 27852800 2700
10389198 mmaxio F March 21, 2015, 8:55 p.m. OK Java 8 TESTS 39 2963 27750400 2700
10413232 vadimmm F March 23, 2015, 6:03 p.m. OK Java 8 TESTS 39 3213 198348800 2700
10413245 vadimmm F March 23, 2015, 6:04 p.m. OK Java 8 TESTS 39 3260 198348800 2700
10517052 azukun F March 29, 2015, 2:57 p.m. OK MS C# TESTS 39 607 94310400 2700
10517126 azukun F March 29, 2015, 3:04 p.m. OK MS C# TESTS 39 670 48332800 2700
10516904 azukun F March 29, 2015, 2:40 p.m. OK MS C# TESTS 39 795 94208000 2700
10516987 azukun F March 29, 2015, 2:48 p.m. OK MS C# TESTS 39 2558 94105600 2700
10516170 azukun F March 29, 2015, 1:28 p.m. OK MS C# TESTS 39 3431 65433600 2700
10516061 azukun F March 29, 2015, 1:20 p.m. OK MS C# TESTS 39 3665 204390400 2700
10383356 Belonogov izban F March 21, 2015, 3:39 p.m. OK MS C++ TESTS 39 2761 65331200 2700
10403507 NALP F March 22, 2015, 5:59 p.m. OK MS C++ TESTS 39 3041 108339200 2700
10388843 Ilya_MSU F March 21, 2015, 8:24 p.m. OK MS C++ TESTS 39 3697 45772800 2700
10382560 SergeyRogulenko RAD F March 21, 2015, 3:20 p.m. OK MS C++ TESTS 39 4320 123084800 2700

remove filters

Back to search problems