Codeforces Round 529 (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
1095 Codeforces Round 529 (Div. 3) FINISHED False 7200 185901899 Dec. 27, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4137 ) E Almost Regular Bracket Sequence PROGRAMMING implementation 1900

B'You are given a bracket sequence s consisting of n opening '( ' and closing ') ' brackets. A regular bracket sequence 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, bracket sequences "()()", "(())" are regular (the resulting expressions are: "(1)+(1)", "((1+1)+1)"), and ")(" and "(" are not. You can change the type of some bracket s_i . It means that if s_i = ') ' then you can change it to '( ' and vice versa. Your task is to calculate the number of positions i such that if you change the type of the i -th bracket, then the resulting bracket sequence becomes regular. The first line of the input contains one integer n ( 1 <= n <= 10^6 ) -- the length of the bracket sequence. The second line of the input contains the string s consisting of n opening '( ' and closing ') ' brackets. Print one integer -- the number of positions i such that if you change the type of the i -th bracket, then the resulting bracket sequence becomes regular. '...

Tutorials

Codeforces Round #529 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
47712611 chemistrae03 E Dec. 30, 2018, 5:18 a.m. OK Clang++17 Diagnostics TESTS 60 546 26316800 1900
47713851 chemistrae03 E Dec. 30, 2018, 6:11 a.m. OK Clang++17 Diagnostics TESTS 60 546 26316800 1900
48443934 ZhouTi E Jan. 16, 2019, 6:19 a.m. OK Clang++17 Diagnostics TESTS 60 2636 43212800 1900
69008694 rr_ E Jan. 18, 2020, 2:05 a.m. OK D TESTS 60 78 22118400 1900
54818280 Denor E May 29, 2019, 10:27 p.m. OK Delphi TESTS 60 951 10137600 1900
60325561 Mokou109 E Sept. 10, 2019, 12:56 a.m. OK GNU C11 TESTS 60 46 5017600 1900
47622182 libra8z E Dec. 28, 2018, 1:20 p.m. OK GNU C11 TESTS 60 46 5017600 1900
54570639 rainboy E May 24, 2019, 7:04 p.m. OK GNU C11 TESTS 60 46 9011200 1900
47783138 Bramble E Dec. 31, 2018, 9:14 a.m. OK GNU C11 TESTS 60 46 16998400 1900
48214631 knia E Jan. 11, 2019, 1:58 p.m. OK GNU C11 TESTS 60 46 18022400 1900
48582586 bogdi E Jan. 19, 2019, 5:26 p.m. OK GNU C++11 TESTS 60 31 819200 1900
58139509 EndRay E Aug. 1, 2019, 5:30 p.m. OK GNU C++11 TESTS 60 31 1536000 1900
53563183 SoiMae E April 30, 2019, 10:55 a.m. OK GNU C++11 TESTS 60 31 2048000 1900
53561409 SoiMae E April 30, 2019, 9:45 a.m. OK GNU C++11 TESTS 60 31 2048000 1900
48080724 coffees E Jan. 8, 2019, 7:37 a.m. OK GNU C++11 TESTS 60 31 2048000 1900
47618600 IrishWhiskey E Dec. 28, 2018, 11:47 a.m. OK GNU C++11 TESTS 60 31 2150400 1900
47617971 heguangfu E Dec. 28, 2018, 11:28 a.m. OK GNU C++11 TESTS 60 31 4812800 1900
49997285 shouryap E Feb. 16, 2019, 3:35 p.m. OK GNU C++11 TESTS 60 31 5017600 1900
58176973 Prof_BL E Aug. 2, 2019, 1:27 p.m. OK GNU C++11 TESTS 60 31 5017600 1900
58151100 biliwang E Aug. 2, 2019, 2:37 a.m. OK GNU C++11 TESTS 60 31 5017600 1900
48928720 Rabbittank E Jan. 25, 2019, 11:41 a.m. OK GNU C++14 TESTS 60 31 1024000 1900
48048873 chamanag E Jan. 7, 2019, 7:01 a.m. OK GNU C++14 TESTS 60 31 2048000 1900
66266589 Bondo E Dec. 4, 2019, 10:44 a.m. OK GNU C++14 TESTS 60 31 2048000 1900
47685718 ntoni_boss E Dec. 29, 2018, 2:41 p.m. OK GNU C++14 TESTS 60 31 5017600 1900
47804684 shuerss E Jan. 1, 2019, 5:53 a.m. OK GNU C++14 TESTS 60 31 5017600 1900
50045112 zhaoy1ping E Feb. 17, 2019, 5:23 a.m. OK GNU C++14 TESTS 60 31 6144000 1900
48800561 C1ariS E Jan. 23, 2019, 2:14 p.m. OK GNU C++14 TESTS 60 31 9011200 1900
48407326 vjudge3 E Jan. 15, 2019, 5:08 a.m. OK GNU C++14 TESTS 60 31 9011200 1900
47835100 z3r0dmg E Jan. 2, 2019, 9:41 a.m. OK GNU C++14 TESTS 60 31 10137600 1900
47674401 ConnorZhong E Dec. 29, 2018, 8:13 a.m. OK GNU C++14 TESTS 60 46 1024000 1900
47622248 Zweib E Dec. 28, 2018, 1:22 p.m. OK GNU C++17 TESTS 60 31 1228800 1900
52070788 Mayimg E March 31, 2019, 7:42 a.m. OK GNU C++17 TESTS 60 31 2048000 1900
47664091 Conceal E Dec. 28, 2018, 9:38 p.m. OK GNU C++17 TESTS 60 31 6144000 1900
47807129 VictorAugur E Jan. 1, 2019, 8:16 a.m. OK GNU C++17 TESTS 60 31 6144000 1900
47676576 K0u1e E Dec. 29, 2018, 9:30 a.m. OK GNU C++17 TESTS 60 31 9216000 1900
50554648 Changod E Feb. 27, 2019, 7:11 a.m. OK GNU C++17 TESTS 60 46 1024000 1900
48127350 CTWyh E Jan. 9, 2019, 2:59 p.m. OK GNU C++17 TESTS 60 46 1024000 1900
47623138 qhqh E Dec. 28, 2018, 1:46 p.m. OK GNU C++17 TESTS 60 46 1024000 1900
47621034 mtnshh E Dec. 28, 2018, 12:48 p.m. OK GNU C++17 TESTS 60 46 1024000 1900
47718164 im0qianqian E Dec. 30, 2018, 9:22 a.m. OK GNU C++17 TESTS 60 46 1945600 1900
60306515 vjudge3 E Sept. 9, 2019, 2:05 p.m. OK Go TESTS 60 78 9728000 1900
60306456 WangJialei E Sept. 9, 2019, 2:04 p.m. OK Go TESTS 60 78 9728000 1900
47830284 ledinhbao E Jan. 2, 2019, 6:02 a.m. OK Go TESTS 60 78 14233600 1900
64685827 IslamTalipovTop E Nov. 11, 2019, 11:42 a.m. OK Java 11 TESTS 60 233 10444800 1900
49809351 Jarik E Feb. 11, 2019, 10:28 p.m. OK Java 8 TESTS 60 124 0 1900
48210376 krit_patel E Jan. 11, 2019, 11:38 a.m. OK Java 8 TESTS 60 124 0 1900
63877065 yaoct E Oct. 30, 2019, 7:22 p.m. OK Java 8 TESTS 60 139 0 1900
48515356 revanthreddy85 E Jan. 18, 2019, 3:20 a.m. OK Java 8 TESTS 60 139 0 1900
47661482 sooraj10 E Dec. 28, 2018, 7:18 p.m. OK Java 8 TESTS 60 140 0 1900
64545459 Agnimandur E Nov. 8, 2019, 8:08 p.m. OK Java 8 TESTS 60 140 0 1900
50505496 mikkk E Feb. 25, 2019, 7:27 p.m. OK Java 8 TESTS 60 140 0 1900
47614147 Maaddy E Dec. 28, 2018, 9:36 a.m. OK Java 8 TESTS 60 140 0 1900
53314532 dtsarun E April 26, 2019, 9:17 a.m. OK Java 8 TESTS 60 140 409600 1900
48515676 chojh1222 E Jan. 18, 2019, 3:40 a.m. OK Java 8 TESTS 60 140 2764800 1900
62312023 NEvOl E Oct. 10, 2019, 2:11 p.m. OK Mono C# TESTS 60 92 14438400 1900
62316560 NEvOl E Oct. 10, 2019, 3:27 p.m. OK Mono C# TESTS 60 93 14540800 1900
62312583 NEvOl E Oct. 10, 2019, 2:20 p.m. OK Mono C# TESTS 60 93 20275200 1900
51072180 NEvOl E March 9, 2019, 8:05 a.m. OK Mono C# TESTS 60 93 20684800 1900
52618621 Mosyagin E April 11, 2019, 7:57 p.m. OK Mono C# TESTS 60 109 11878400 1900
51147245 scorpiowf E March 11, 2019, 4:46 a.m. OK MS C++ TESTS 60 46 1126400 1900
68434347 vjudge1 E Jan. 9, 2020, 8:20 a.m. OK MS C++ TESTS 60 46 2048000 1900
47716026 vjudge2 E Dec. 30, 2018, 7:46 a.m. OK MS C++ TESTS 60 46 5017600 1900
47716000 vjudge5 E Dec. 30, 2018, 7:45 a.m. OK MS C++ TESTS 60 46 5017600 1900
48410467 CristianoRonaldo E Jan. 15, 2019, 7:24 a.m. OK MS C++ TESTS 60 46 5017600 1900
62050842 vjudge2 E Oct. 7, 2019, 9:23 a.m. OK MS C++ TESTS 60 46 5017600 1900
50096322 vjudge4 E Feb. 18, 2019, 12:56 p.m. OK MS C++ TESTS 60 46 9011200 1900
66402485 vjudge3 E Dec. 6, 2019, 12:42 p.m. OK MS C++ TESTS 60 46 9011200 1900
47719524 hbase E Dec. 30, 2018, 10:19 a.m. OK MS C++ TESTS 60 46 10547200 1900
47952984 vjudge3 E Jan. 5, 2019, 3:24 a.m. OK MS C++ TESTS 60 46 10547200 1900
57999089 pmitkov E July 30, 2019, 2:49 p.m. OK MS C++ 2017 TESTS 60 46 9011200 1900
56159453 petko_mitkov E June 27, 2019, 11:44 a.m. OK MS C++ 2017 TESTS 60 46 9011200 1900
50235386 YoloZx E Feb. 20, 2019, 10:30 a.m. OK MS C++ 2017 TESTS 60 46 11059200 1900
58230732 yorky E Aug. 3, 2019, 4:42 p.m. OK MS C++ 2017 TESTS 60 61 9216000 1900
58649574 ZSTU-2018329621261 E Aug. 12, 2019, 7:02 a.m. OK MS C++ 2017 TESTS 60 62 13004800 1900
58553397 Vovkaez E Aug. 10, 2019, 10:24 p.m. OK MS C++ 2017 TESTS 60 62 16998400 1900
57539085 AtomG E July 22, 2019, 3:55 p.m. OK MS C++ 2017 TESTS 60 78 9216000 1900
49618932 Efrocinya E Feb. 8, 2019, 8:06 a.m. OK MS C++ 2017 TESTS 60 171 16998400 1900
47771937 mayakin E Dec. 30, 2018, 10:21 p.m. OK PHP TESTS 60 389 3686400 1900
49808049 idgaf E Feb. 11, 2019, 9:15 p.m. OK PyPy 2 TESTS 60 202 18739200 1900
48109098 megaspazz E Jan. 9, 2019, 7:59 a.m. OK PyPy 3 TESTS 60 218 11468800 1900
49809578 Jarik E Feb. 11, 2019, 10:45 p.m. OK PyPy 3 TESTS 60 233 6656000 1900
48107084 dplus1016 E Jan. 9, 2019, 6:20 a.m. OK PyPy 3 TESTS 60 249 20582400 1900
48184933 tsukuyomi E Jan. 10, 2019, 2:29 p.m. OK PyPy 3 TESTS 60 265 15257600 1900
47614204 ccsu_cat_love_jiejie E Dec. 28, 2018, 9:38 a.m. OK PyPy 3 TESTS 60 265 35942400 1900
57158095 brosucks E July 16, 2019, 5:39 p.m. OK PyPy 3 TESTS 60 280 16281600 1900
62331580 ananya17020 E Oct. 10, 2019, 9:04 p.m. OK PyPy 3 TESTS 60 296 20480000 1900
50693425 gatsko E March 2, 2019, 4:47 p.m. OK PyPy 3 TESTS 60 296 23756800 1900
47619967 MotaSanyal E Dec. 28, 2018, 12:21 p.m. OK PyPy 3 TESTS 60 342 50585600 1900
51316137 j30ng E March 15, 2019, 12:28 a.m. OK PyPy 3 TESTS 60 343 16588800 1900
47824090 psaini E Jan. 1, 2019, 8:21 p.m. OK Python 2 TESTS 60 920 38400000 1900
47708919 whatshisbucket E Dec. 30, 2018, 12:11 a.m. OK Python 3 TESTS 60 420 31744000 1900
49062410 Narut E Jan. 27, 2019, 4:03 p.m. OK Python 3 TESTS 60 546 4300800 1900
47855538 julianferres E Jan. 2, 2019, 9:32 p.m. OK Python 3 TESTS 60 546 30822400 1900
47767747 danielmk E Dec. 30, 2018, 6:53 p.m. OK Python 3 TESTS 60 639 31846400 1900
49809639 Jarik E Feb. 11, 2019, 10:52 p.m. OK Python 3 TESTS 60 670 3379200 1900
49766854 Leendertz E Feb. 11, 2019, 12:03 p.m. OK Python 3 TESTS 60 748 11468800 1900
47857092 enkokoko E Jan. 3, 2019, 12:18 a.m. OK Python 3 TESTS 60 904 3276800 1900
62327047 LintuStorm E Oct. 10, 2019, 6:56 p.m. OK Python 3 TESTS 60 920 85401600 1900
48383954 Tauzn E Jan. 14, 2019, 11:57 a.m. OK Python 3 TESTS 60 1513 63488000 1900
49765796 hoochiemane E Feb. 11, 2019, 11:36 a.m. OK Python 3 TESTS 60 1840 58265600 1900

remove filters

Back to search problems