Educational Codeforces Round 147 (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
1821 Educational Codeforces Round 147 (Rated for Div. 2) FINISHED False 7200 55178663 April 20, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2446 ) E Rearrange Brackets PROGRAMMING dp greedy math sortings

B'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: You are given a regular bracket sequence. In one move, you can remove a pair of adjacent brackets such that the left one is an opening bracket and the right one is a closing bracket. Then concatenate the resulting parts without changing the order. The cost of this move is the number of brackets to the right of the right bracket of this pair. The cost of the regular bracket sequence is the smallest total cost of the moves required to make the sequence empty. Actually, you are not removing any brackets. Instead, you are given a regular bracket sequence and an integer k . You can perform the following operation at most k times: After all operations are performed, the bracket sequence has to be regular. What is the smallest possible cost of the resulting regular bracket sequence? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The first line of each testcase contains a single integer k ( 0 <= k <= 5 ) -- the maximum number of operations you can perform. The second line contains a non-empty regular bracket sequence, it consists only of characters '( ' and ') '. The total length of the regular bracket sequences over all testcases doesn 't exceed 2 cdot 10^5 . For each testcase, print a single integer -- the smallest possible cost of the regular bracket sequence after you perform at most k operations on it. '...

Tutorials

115296

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
202904286 DmitriyAnikeyev E April 20, 2023, 10:28 p.m. OK C# 10 TESTS 52 514 83148800
202904728 DmitriyAnikeyev E April 20, 2023, 10:42 p.m. OK C# 10 TESTS 52 561 86630400
202904678 DmitriyAnikeyev E April 20, 2023, 10:41 p.m. OK C# 10 TESTS 52 873 83148800
202892668 psruk E April 20, 2023, 6:22 p.m. OK Clang++20 Diagnostics TESTS 52 654 21504000
203001939 luogu_bot5 E April 22, 2023, 2:51 a.m. OK GNU C++14 TESTS 52 31 512000
202963126 storybehind E April 21, 2023, 2:35 p.m. OK GNU C++14 TESTS 52 31 819200
202955848 Neutralised E April 21, 2023, 1:12 p.m. OK GNU C++14 TESTS 52 31 1024000
202954663 lamter E April 21, 2023, 1 p.m. OK GNU C++14 TESTS 52 31 1740800
202911404 loser--007 E April 21, 2023, 2:19 a.m. OK GNU C++14 TESTS 52 31 1843200
202992682 omeganot E April 21, 2023, 10:09 p.m. OK GNU C++14 TESTS 52 31 2457600
202910015 ch_beans E April 21, 2023, 1:40 a.m. OK GNU C++14 TESTS 52 31 3584000
202942127 harryb17 E April 21, 2023, 10:04 a.m. OK GNU C++14 TESTS 52 31 5836800
202942098 harryb17 E April 21, 2023, 10:03 a.m. OK GNU C++14 TESTS 52 31 5836800
202996745 2018ljw E April 22, 2023, 12:15 a.m. OK GNU C++14 TESTS 52 31 8192000
202960603 raoxiangjun E April 21, 2023, 2:05 p.m. OK GNU C++17 TESTS 52 15 1843200
202930574 Mtaylor E April 21, 2023, 7:29 a.m. OK GNU C++17 TESTS 52 30 3481600
202952416 KassiJulgus E April 21, 2023, 12:32 p.m. OK GNU C++17 TESTS 52 31 1024000
202954181 ventusliberum E April 21, 2023, 12:54 p.m. OK GNU C++17 TESTS 52 31 1638400
202986033 idoproblems E April 21, 2023, 7:39 p.m. OK GNU C++17 TESTS 52 31 1740800
202948496 phineas__0709 E April 21, 2023, 11:39 a.m. OK GNU C++17 TESTS 52 31 1740800
202914198 reilu E April 21, 2023, 3:28 a.m. OK GNU C++17 TESTS 52 31 1740800
202912933 OMG_wc E April 21, 2023, 2:57 a.m. OK GNU C++17 TESTS 52 31 1945600
203005877 21H51A6655 E April 22, 2023, 4:21 a.m. OK GNU C++17 TESTS 52 31 2150400
202907363 George_Rubio E April 21, 2023, 12:16 a.m. OK GNU C++17 TESTS 52 31 2150400
202951337 platelet E April 21, 2023, 12:19 p.m. OK GNU C++17 (64) TESTS 52 15 512000
202913343 Pointy E April 21, 2023, 3:06 a.m. OK GNU C++17 (64) TESTS 52 30 4505600
202885413 YouStill_DontKnowMeYet E April 20, 2023, 5 p.m. OK GNU C++17 (64) TESTS 52 30 17715200
202893395 Xc4l16r3 E April 20, 2023, 6:30 p.m. OK GNU C++17 (64) TESTS 52 31 1433600
202887402 Xc4l16r3 E April 20, 2023, 5:19 p.m. OK GNU C++17 (64) TESTS 52 31 1433600
202891606 illume2021 E April 20, 2023, 6:07 p.m. OK GNU C++17 (64) TESTS 52 31 1536000
202965208 PinoF E April 21, 2023, 3 p.m. OK GNU C++17 (64) TESTS 52 31 1740800
202964359 PinoF E April 21, 2023, 2:49 p.m. OK GNU C++17 (64) TESTS 52 31 1740800
202928214 dreamoon_love_AA E April 21, 2023, 6:54 a.m. OK GNU C++17 (64) TESTS 52 31 1945600
202886074 DeadlyPillow E April 20, 2023, 5:06 p.m. OK GNU C++17 (64) TESTS 52 31 1945600
203010232 Theo830 E April 22, 2023, 5:36 a.m. OK GNU C++20 (64) TESTS 52 15 512000
202955794 davi-v E April 21, 2023, 1:11 p.m. OK GNU C++20 (64) TESTS 52 15 921600
202886875 fishcathu. E April 20, 2023, 5:14 p.m. OK GNU C++20 (64) TESTS 52 15 921600
202933084 BurnedChicken E April 21, 2023, 8:04 a.m. OK GNU C++20 (64) TESTS 52 15 1331200
202923251 bandiaoz E April 21, 2023, 6:05 a.m. OK GNU C++20 (64) TESTS 52 15 1331200
202886006 abc864197532 E April 20, 2023, 5:05 p.m. OK GNU C++20 (64) TESTS 52 15 1331200
202933789 __stick E April 21, 2023, 8:14 a.m. OK GNU C++20 (64) TESTS 52 15 1843200
202926053 3000elo E April 21, 2023, 6:30 a.m. OK GNU C++20 (64) TESTS 52 15 1843200
202888996 Equinoxy E April 20, 2023, 5:36 p.m. OK GNU C++20 (64) TESTS 52 15 1843200
202888615 fishcathu. E April 20, 2023, 5:32 p.m. OK GNU C++20 (64) TESTS 52 15 1843200
202969784 liangjiahui11 E April 21, 2023, 3:54 p.m. OK Go TESTS 52 46 6553600
202888943 HugeHobbit E April 20, 2023, 5:35 p.m. OK Java 11 TESTS 52 326 0
202890692 dzhi E April 20, 2023, 5:56 p.m. OK Java 11 TESTS 52 420 5324800
202885228 profchi E April 20, 2023, 4:59 p.m. OK Java 11 TESTS 52 904 207360000
202888619 IanISam E April 20, 2023, 5:32 p.m. OK Java 8 TESTS 52 187 0
202900976 UniversalAdmin E April 20, 2023, 9:03 p.m. OK Java 8 TESTS 52 202 0
202886550 yvbf E April 20, 2023, 5:11 p.m. OK Java 8 TESTS 52 202 17510400
202901248 UniversalAdmin E April 20, 2023, 9:10 p.m. OK Java 8 TESTS 52 217 102400
202901118 UniversalAdmin E April 20, 2023, 9:06 p.m. OK Java 8 TESTS 52 233 102400
202916198 riyadas.200208 E April 21, 2023, 4:16 a.m. OK Java 8 TESTS 52 296 0
202885808 Lyle0711 E April 20, 2023, 5:04 p.m. OK PyPy 3 TESTS 52 733 6451200
202906863 RobinFromTheHood E April 20, 2023, 11:58 p.m. OK PyPy 3-64 TESTS 52 124 9113600
202914477 SoleProprietor E April 21, 2023, 3:35 a.m. OK PyPy 3-64 TESTS 52 124 9318400
202968753 titia E April 21, 2023, 3:42 p.m. OK PyPy 3-64 TESTS 52 171 8294400
202901177 1_2_3_4_5_9 E April 20, 2023, 9:08 p.m. OK PyPy 3-64 TESTS 52 202 30208000
202912146 ZrjaK E April 21, 2023, 2:39 a.m. OK PyPy 3-64 TESTS 52 217 15974400
202965613 pythonist_viking E April 21, 2023, 3:05 p.m. OK PyPy 3-64 TESTS 52 217 32460800
202956436 Yansou E April 21, 2023, 1:18 p.m. OK PyPy 3-64 TESTS 52 218 9830400
202892047 birsnot E April 20, 2023, 6:15 p.m. OK PyPy 3-64 TESTS 52 233 9113600
202980216 LMeyling E April 21, 2023, 6:07 p.m. OK PyPy 3-64 TESTS 52 312 9728000
202953083 Shri_874 E April 21, 2023, 12:41 p.m. OK PyPy 3-64 TESTS 52 342 22425600
202953512 momoyao E April 21, 2023, 12:46 p.m. OK Python 3 TESTS 52 358 3788800
202889014 BabyBlue0514 E April 20, 2023, 5:36 p.m. OK Python 3 TESTS 52 451 3584000
202915877 cpchenpi E April 21, 2023, 4:09 a.m. OK Rust 2021 TESTS 52 15 3584000

remove filters

Back to search problems