Educational Codeforces Round 125 (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
1657 Educational Codeforces Round 125 (Rated for Div. 2) FINISHED False 7200 83862899 March 22, 2022, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16879 ) C Bracket Sequence Deletion PROGRAMMING greedy hashing

B"You are given a bracket sequence consisting of n characters '(' and/or )'. You perform several operations with it. During one operation, you choose the shortest prefix of this string (some amount of first characters of the string) that is good and remove it from the string. The prefix is considered good if one of the following two conditions is satisfied: A bracket sequence is called regular if it is possible to obtain a correct arithmetic expression by inserting characters '+' and '1' into this sequence. For example, sequences (())(), () and (()(())) are regular, while )(, (() and (()))( are not. The bracket sequence is called palindrome if it reads the same back and forth. For example, the bracket sequences )), (( and )(() are palindromes, while bracket sequences (), )( and ))( are not palindromes. You stop performing the operations when it's not possible to find a good prefix. Your task is to find the number of operations you will perform on the given string and the number of remaining characters in the string. You have to answer t independent test cases. The first line of the input contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The next 2t lines describe test cases. The first line of the test case contains one integer n ( 1 <= n <= 5 cdot 10^5 ) -- the length of the bracket sequence. The second line of the test case contains n characters '(' and/or ')' -- the bracket sequence itself. It is guaranteed that the sum of n over all test cases do not exceed 5 cdot 10^5 ( sum n <= 5 cdot 10^5 ). For each test case, print two integers c and r -- the number of operations you will perform on the given bracket sequence and the number of characters that remain in the string after performing all operations. "...

Tutorials

101161

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
150559110 Shukuang C March 23, 2022, 12:37 a.m. OK Clang++17 Diagnostics TESTS 26 46 3481600
150585744 1918472049 C March 23, 2022, 8:23 a.m. OK Clang++17 Diagnostics TESTS 26 156 13824000
150559821 Liutaiji C March 23, 2022, 12:57 a.m. OK Clang++17 Diagnostics TESTS 26 171 614400
150592186 1287971889 C March 23, 2022, 9:38 a.m. OK Clang++17 Diagnostics TESTS 26 296 15769600
150567430 ruban C March 23, 2022, 4:09 a.m. OK Delphi TESTS 26 202 1024000
150553658 NenadDapic C March 22, 2022, 9:58 p.m. OK FPC TESTS 26 61 512000
150564741 lazychen C March 23, 2022, 3:12 a.m. OK GNU C11 TESTS 26 46 512000
150538634 Dipressible C March 22, 2022, 6:06 p.m. OK GNU C11 TESTS 26 46 512000
150624504 Lao_Nan_Ren C March 23, 2022, 3:09 p.m. OK GNU C11 TESTS 26 46 512000
150574962 loki_7 C March 23, 2022, 6:12 a.m. OK GNU C11 TESTS 26 46 819200
150664858 urvish_pujara C March 24, 2022, 3:47 a.m. OK GNU C11 TESTS 26 93 512000
150619838 luoZH111 C March 23, 2022, 2:25 p.m. OK GNU C++14 TESTS 26 15 512000
150619787 abc123def123 C March 23, 2022, 2:25 p.m. OK GNU C++14 TESTS 26 15 512000
150616046 xtustc C March 23, 2022, 1:53 p.m. OK GNU C++14 TESTS 26 15 512000
150610814 luoZH111 C March 23, 2022, 1:05 p.m. OK GNU C++14 TESTS 26 15 512000
150605380 FrozenZero C March 23, 2022, 12:06 p.m. OK GNU C++14 TESTS 26 15 512000
150578600 zyl19416 C March 23, 2022, 6:54 a.m. OK GNU C++14 TESTS 26 15 512000
150577549 LowLightK C March 23, 2022, 6:42 a.m. OK GNU C++14 TESTS 26 15 512000
150575942 AtomsH C March 23, 2022, 6:23 a.m. OK GNU C++14 TESTS 26 15 512000
150630847 gauravgb8755 C March 23, 2022, 4:23 p.m. OK GNU C++14 TESTS 26 15 512000
150638102 nadim28 C March 23, 2022, 5:53 p.m. OK GNU C++14 TESTS 26 15 512000
150596218 JL_Coder C March 23, 2022, 10:30 a.m. OK GNU C++17 TESTS 26 15 512000
150616883 vjudge2 C March 23, 2022, 2 p.m. OK GNU C++17 TESTS 26 15 512000
150613117 Rai_Utkarsh C March 23, 2022, 1:29 p.m. OK GNU C++17 TESTS 26 15 512000
150590241 notyour-Z C March 23, 2022, 9:16 a.m. OK GNU C++17 TESTS 26 15 512000
150590025 WWW.H C March 23, 2022, 9:13 a.m. OK GNU C++17 TESTS 26 15 512000
150587615 KAUSTUBH152003 C March 23, 2022, 8:46 a.m. OK GNU C++17 TESTS 26 15 512000
150587538 EvfXR C March 23, 2022, 8:45 a.m. OK GNU C++17 TESTS 26 15 512000
150585425 SajibKC_19 C March 23, 2022, 8:20 a.m. OK GNU C++17 TESTS 26 15 512000
150583228 fhqTreap C March 23, 2022, 7:51 a.m. OK GNU C++17 TESTS 26 15 512000
150582739 lyien C March 23, 2022, 7:44 a.m. OK GNU C++17 TESTS 26 15 512000
150599058 w23c3c3 C March 23, 2022, 11:02 a.m. OK GNU C++17 (64) TESTS 26 15 512000
150597468 BalasaRadu C March 23, 2022, 10:45 a.m. OK GNU C++17 (64) TESTS 26 15 512000
150590876 robinsen C March 23, 2022, 9:23 a.m. OK GNU C++17 (64) TESTS 26 15 512000
150568459 ppt1524 C March 23, 2022, 4:29 a.m. OK GNU C++17 (64) TESTS 26 15 614400
150661857 froggyzhang C March 24, 2022, 2:24 a.m. OK GNU C++17 (64) TESTS 26 15 1638400
150652686 NFJJunior C March 23, 2022, 9:40 p.m. OK GNU C++17 (64) TESTS 26 15 1638400
150644040 TAM C March 23, 2022, 7:11 p.m. OK GNU C++17 (64) TESTS 26 15 1638400
150643118 dufresne_1949 C March 23, 2022, 6:58 p.m. OK GNU C++17 (64) TESTS 26 15 1638400
150665023 HimanshuG C March 24, 2022, 3:52 a.m. OK GNU C++17 (64) TESTS 26 15 1638400
150670759 Osazoname C March 24, 2022, 5:48 a.m. OK GNU C++17 (64) TESTS 26 15 1638400
150567647 Atangyl C March 23, 2022, 4:13 a.m. OK GNU C++20 (64) TESTS 26 15 0
150551774 EslamAbdelwahid C March 22, 2022, 9:19 p.m. OK GNU C++20 (64) TESTS 26 15 0
150560465 lwbupt C March 23, 2022, 1:18 a.m. OK GNU C++20 (64) TESTS 26 15 409600
150537732 sakib.safwan C March 22, 2022, 5:56 p.m. OK GNU C++20 (64) TESTS 26 15 512000
150541490 Igor_2017 C March 22, 2022, 6:39 p.m. OK GNU C++20 (64) TESTS 26 15 512000
150659030 paekae C March 24, 2022, 12:58 a.m. OK GNU C++20 (64) TESTS 26 15 819200
150665421 wumbus C March 24, 2022, 4:01 a.m. OK GNU C++20 (64) TESTS 26 15 1433600
150656747 hayford08 C March 23, 2022, 11:36 p.m. OK GNU C++20 (64) TESTS 26 15 1433600
150656595 hayford08 C March 23, 2022, 11:31 p.m. OK GNU C++20 (64) TESTS 26 15 1433600
150668189 pratham_bansal C March 24, 2022, 5:01 a.m. OK GNU C++20 (64) TESTS 26 15 1433600
150565111 QianciJun C March 23, 2022, 3:20 a.m. OK Go TESTS 26 31 3686400
150669156 0x3F C March 24, 2022, 5:19 a.m. OK Go TESTS 26 31 3686400
150539912 Mother_Father C March 22, 2022, 6:20 p.m. OK Go TESTS 26 1606 4812800
150590100 naman5811 C March 23, 2022, 9:14 a.m. OK Java 11 TESTS 26 186 0
150620341 Tnameh_Atews C March 23, 2022, 2:30 p.m. OK Java 11 TESTS 26 187 0
150613624 syam.kumar C March 23, 2022, 1:33 p.m. OK Java 11 TESTS 26 202 0
150634626 Tnameh_Atews C March 23, 2022, 5:13 p.m. OK Java 11 TESTS 26 202 0
150624798 kartheek542 C March 23, 2022, 3:12 p.m. OK Java 11 TESTS 26 202 0
150603242 vijender_8601 C March 23, 2022, 11:45 a.m. OK Java 11 TESTS 26 202 0
150580532 the_unseen C March 23, 2022, 7:17 a.m. OK Java 11 TESTS 26 202 0
150569307 SaberXpro C March 23, 2022, 4:44 a.m. OK Java 11 TESTS 26 202 0
150544660 singhshivsm20001 C March 22, 2022, 7:22 p.m. OK Java 11 TESTS 26 202 0
150541611 dinosparton_013 C March 22, 2022, 6:41 p.m. OK Java 11 TESTS 26 202 0
150556567 Diaa12360 C March 22, 2022, 11:18 p.m. OK Java 8 TESTS 26 108 0
150541777 ITSpecialist C March 22, 2022, 6:44 p.m. OK Java 8 TESTS 26 108 0
150578670 DEMO23 C March 23, 2022, 6:55 a.m. OK Java 8 TESTS 26 108 0
150561879 alibaba C March 23, 2022, 2:01 a.m. OK Java 8 TESTS 26 108 0
150559528 -crazy_coder- C March 23, 2022, 12:48 a.m. OK Java 8 TESTS 26 108 0
150577520 _snowballsenpai C March 23, 2022, 6:41 a.m. OK Java 8 TESTS 26 109 0
150638788 ShivamMehta C March 23, 2022, 6:01 p.m. OK Java 8 TESTS 26 109 5836800
150544443 _Eyepatch C March 22, 2022, 7:19 p.m. OK Java 8 TESTS 26 124 0
150616040 tumsenahoga C March 23, 2022, 1:53 p.m. OK Java 8 TESTS 26 155 0
150541424 tyrion_123 C March 22, 2022, 6:38 p.m. OK Java 8 TESTS 26 171 0
150578163 _Astron C March 23, 2022, 6:49 a.m. OK Kotlin 1.4 TESTS 26 109 0
150590524 koboshi C March 23, 2022, 9:19 a.m. OK Kotlin 1.5 TESTS 26 187 0
150616512 Kanam C March 23, 2022, 1:57 p.m. OK MS C++ 2017 TESTS 26 61 1331200
150612882 Sagidullca C March 23, 2022, 1:28 p.m. OK MS C++ 2017 TESTS 26 61 1331200
150561769 _Rimjhim_36 C March 23, 2022, 1:57 a.m. OK MS C++ 2017 TESTS 26 62 1331200
150604328 mikasamikoto C March 23, 2022, 11:56 a.m. OK MS C++ 2017 TESTS 26 62 1331200
150589728 mahmoud_saad C March 23, 2022, 9:10 a.m. OK MS C++ 2017 TESTS 26 62 1331200
150626429 capability_Wu C March 23, 2022, 3:29 p.m. OK MS C++ 2017 TESTS 26 62 1945600
150628648 CharLinuX C March 23, 2022, 3:56 p.m. OK MS C++ 2017 TESTS 26 62 8499200
150559803 Liutaiji C March 23, 2022, 12:57 a.m. OK MS C++ 2017 TESTS 26 77 512000
150637369 Alexey C March 23, 2022, 5:45 p.m. OK MS C++ 2017 TESTS 26 77 1331200
150609667 XQB C March 23, 2022, 12:50 p.m. OK MS C++ 2017 TESTS 26 77 1331200
150538322 suraj C March 22, 2022, 6:02 p.m. OK .NET Core C# TESTS 26 93 3891200
150563116 Olasiliksizci C March 23, 2022, 2:33 a.m. OK .NET Core C# TESTS 26 108 2560000
150655310 Matumba C March 23, 2022, 10:47 p.m. OK .NET Core C# TESTS 26 124 2560000
150579496 chinesedfan C March 23, 2022, 7:05 a.m. OK Node.js TESTS 26 109 5120000
150554429 toxahak C March 22, 2022, 10:17 p.m. OK Node.js TESTS 26 202 6553600
150628707 vaibhav_india C March 23, 2022, 3:57 p.m. OK PyPy 3 TESTS 26 155 5529600
150565743 hwei002 C March 23, 2022, 3:34 a.m. OK PyPy 3 TESTS 26 155 5939200
150671450 hjkim C March 24, 2022, 6 a.m. OK PyPy 3 TESTS 26 186 6963200
150639566 ON_THE_EDGE C March 23, 2022, 6:11 p.m. OK PyPy 3 TESTS 26 187 8704000
150658786 toam C March 24, 2022, 12:48 a.m. OK PyPy 3 TESTS 26 202 8704000
150594823 Mahmud_Coder C March 23, 2022, 10:13 a.m. OK PyPy 3 TESTS 26 202 9011200
150569080 kwin C March 23, 2022, 4:40 a.m. OK PyPy 3 TESTS 26 202 9011200
150555273 crapcode C March 22, 2022, 10:41 p.m. OK PyPy 3 TESTS 26 217 9523200
150554990 crapcode C March 22, 2022, 10:34 p.m. OK PyPy 3 TESTS 26 233 9523200
150555163 crapcode C March 22, 2022, 10:38 p.m. OK PyPy 3 TESTS 26 233 9625600
150662891 Lhohelhohehmm C March 24, 2022, 2:55 a.m. OK PyPy 3-64 TESTS 26 124 9318400
150586866 zachyang C March 23, 2022, 8:37 a.m. OK PyPy 3-64 TESTS 26 139 17920000
150576518 notTehlka C March 23, 2022, 6:30 a.m. OK PyPy 3-64 TESTS 26 140 28569600
150545802 Skillful_Wanderer C March 22, 2022, 7:39 p.m. OK PyPy 3-64 TESTS 26 155 9728000
150556978 MistaAsh C March 22, 2022, 11:32 p.m. OK PyPy 3-64 TESTS 26 155 10137600
150581419 hvbird C March 23, 2022, 7:28 a.m. OK PyPy 3-64 TESTS 26 155 18636800
150558390 majay1638 C March 23, 2022, 12:16 a.m. OK PyPy 3-64 TESTS 26 156 10649600
150549103 sami02jain C March 22, 2022, 8:29 p.m. OK PyPy 3-64 TESTS 26 171 10342400
150578930 SalatL C March 23, 2022, 6:58 a.m. OK PyPy 3-64 TESTS 26 171 32256000
150603058 xabialonso14 C March 23, 2022, 11:43 a.m. OK PyPy 3-64 TESTS 26 186 9932800
150580736 Dixit_here C March 23, 2022, 7:19 a.m. OK Python 3 TESTS 26 171 1331200
150537942 eugalt C March 22, 2022, 5:58 p.m. OK Python 3 TESTS 26 171 1638400
150602294 eugalt C March 23, 2022, 11:36 a.m. OK Python 3 TESTS 26 171 1740800
150571822 del-user-774348 C March 23, 2022, 5:21 a.m. OK Python 3 TESTS 26 187 1126400
150599029 woodsman C March 23, 2022, 11:02 a.m. OK Python 3 TESTS 26 202 1536000
150599193 eugalt C March 23, 2022, 11:04 a.m. OK Python 3 TESTS 26 202 1740800
150584623 sPARTY C March 23, 2022, 8:10 a.m. OK Python 3 TESTS 26 202 2867200
150668756 20161222 C March 24, 2022, 5:12 a.m. OK Python 3 TESTS 26 218 1536000
150620475 1Demiurg C March 23, 2022, 2:31 p.m. OK Python 3 TESTS 26 233 1536000
150585193 c_handler C March 23, 2022, 8:17 a.m. OK Python 3 TESTS 26 233 1536000
150590727 Spheniscine C March 23, 2022, 9:21 a.m. OK Rust 2021 TESTS 26 15 614400
150587388 Spheniscine C March 23, 2022, 8:43 a.m. OK Rust 2021 TESTS 26 15 614400

remove filters

Back to search problems