Educational Codeforces Round 115 (Rated for Div. 2)

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
1598 Educational Codeforces Round 115 (Rated for Div. 2) FINISHED False 7200 103409663 Oct. 10, 2021, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1457 ) F RBS PROGRAMMING binary search bitmasks data structures dp

B'A bracket sequence is a string containing only characters "(" and ")". A regular bracket sequence (or, shortly, an RBS) is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" between the original characters of the sequence. For example: Let 's denote the concatenation of two strings x and y as x+y . For example, "()()" + ")(" = "()())(". You are given n bracket sequences s_1, s_2, ... , s_n . You can rearrange them in any order (you can rearrange only the strings themselves, but not the characters in them). Your task is to rearrange the strings in such a way that the string s_1 + s_2 + ... + s_n has as many non-empty prefixes that are RBS as possible. The first line contains a single integer n ( 1 <= n <= 20 ). Then n lines follow, the i -th of them contains s_i -- a bracket sequence (a string consisting of characters "(" and/or ")". All sequences s_i are non-empty, their total length does not exceed 4 cdot 10^5 . Print one integer -- the maximum number of non-empty prefixes that are RBS for the string s_1 + s_2 + ... + s_n , if the strings s_1, s_2, ... , s_n can be rearranged arbitrarily. In the first example, you can concatenate the strings as follows: "(" + ")" = "()", the resulting string will have one prefix, that is an RBS: "()". In the second example, you can concatenate the strings as follows: "(" + ")" + "()()())" + "(" = "()()()())(", the resulting string will have four prefixes that are RBS: "()", "()()", "()()()", "()()()()". The third and the fourth examples contain only one string each, so the order is fixed. '...

Tutorials

95890

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
131488525 rainboy F Oct. 10, 2021, 5:28 p.m. OK GNU C11 TESTS 123 109 44544000
131475542 8e7 F Oct. 10, 2021, 2:46 p.m. OK GNU C++14 TESTS 123 109 22732800
131452485 gs18080 F Oct. 10, 2021, 11:03 a.m. OK GNU C++14 TESTS 123 124 52121600
131461317 SSL_XJQ F Oct. 10, 2021, 12:13 p.m. OK GNU C++14 TESTS 123 124 63795200
131465600 crashed F Oct. 10, 2021, 1 p.m. OK GNU C++14 TESTS 123 140 10137600
131466481 suxxsfe F Oct. 10, 2021, 1:09 p.m. OK GNU C++14 TESTS 123 140 44544000
131483315 syksykCCC F Oct. 10, 2021, 4:18 p.m. OK GNU C++14 TESTS 123 140 44851200
131506953 KING_OF_TURTLE F Oct. 11, 2021, 2:01 a.m. OK GNU C++14 TESTS 123 140 361267200
131465059 crashed F Oct. 10, 2021, 12:54 p.m. OK GNU C++14 TESTS 123 155 11366400
131467429 RenaMoe F Oct. 10, 2021, 1:19 p.m. OK GNU C++14 TESTS 123 155 14438400
131509426 20181gdgzoi236_lc F Oct. 11, 2021, 3:12 a.m. OK GNU C++14 TESTS 124 155 58470400
131477597 tbzard F Oct. 10, 2021, 3:09 p.m. OK GNU C++17 TESTS 123 124 106496000
131465058 macslaytion F Oct. 10, 2021, 12:54 p.m. OK GNU C++17 TESTS 123 140 52633600
131458522 dottle F Oct. 10, 2021, 11:43 a.m. OK GNU C++17 TESTS 123 140 424755200
131464763 atodo F Oct. 10, 2021, 12:51 p.m. OK GNU C++17 TESTS 123 155 76902400
131470247 a2dalek F Oct. 10, 2021, 1:49 p.m. OK GNU C++17 TESTS 123 155 140902400
131452349 Radin_Zahedi F Oct. 10, 2021, 11:02 a.m. OK GNU C++17 TESTS 123 156 55296000
131494468 islingr F Oct. 10, 2021, 6:59 p.m. OK GNU C++17 TESTS 123 171 9830400
131462714 Defener F Oct. 10, 2021, 12:28 p.m. OK GNU C++17 TESTS 123 171 18124800
131508599 _FireGhost_ F Oct. 11, 2021, 2:53 a.m. OK GNU C++17 TESTS 123 171 21196800
131459283 p3rfect F Oct. 10, 2021, 11:51 a.m. OK GNU C++17 TESTS 123 187 71782400
131457095 w2w2 F Oct. 10, 2021, 11:31 a.m. OK GNU C++17 (64) TESTS 123 109 24985600
131462803 Alan233 F Oct. 10, 2021, 12:29 p.m. OK GNU C++17 (64) TESTS 123 124 15052800
131481706 huangxiaohua F Oct. 10, 2021, 3:59 p.m. OK GNU C++17 (64) TESTS 123 124 64716800
131507395 xuziyuan F Oct. 11, 2021, 2:21 a.m. OK GNU C++17 (64) TESTS 123 139 134144000
131474909 kmjp F Oct. 10, 2021, 2:39 p.m. OK GNU C++17 (64) TESTS 123 140 11366400
131495906 Ormlis F Oct. 10, 2021, 7:24 p.m. OK GNU C++17 (64) TESTS 123 140 11980800
131458770 FatihSolak F Oct. 10, 2021, 11:46 a.m. OK GNU C++17 (64) TESTS 123 140 131379200
131481521 huangxiaohua F Oct. 10, 2021, 3:57 p.m. OK GNU C++17 (64) TESTS 123 155 64716800
131510265 dqhungdl F Oct. 11, 2021, 3:29 a.m. OK GNU C++17 (64) TESTS 124 155 84889600
131512294 Kuroni F Oct. 11, 2021, 4:07 a.m. OK GNU C++17 (64) TESTS 124 155 141516800
131509172 TheSawan F Oct. 11, 2021, 3:06 a.m. OK Java 8 TESTS 123 1466 95436800
131492930 elizarov F Oct. 10, 2021, 6:35 p.m. OK Kotlin 1.5 TESTS 123 639 39014400
131487677 hxu10 F Oct. 10, 2021, 5:17 p.m. OK PyPy 3 TESTS 123 2573 107008000
131487068 hxu10 F Oct. 10, 2021, 5:09 p.m. OK PyPy 3 TESTS 123 2605 111513600

remove filters

Back to search problems