Codeforces Round 1026 (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
2110 Codeforces Round 1026 (Div. 2) FINISHED False 7200 28308323 May 24, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 27180 ) B Down with Brackets PROGRAMMING strings

In 2077, robots decided to get rid of balanced bracket sequences once and for all! A bracket sequence is called balanced if it can be constructed by the following formal grammar. The empty sequence (\varnothing) is balanced. If the bracket sequence (A) is balanced, then (\mathtt{(}A\mathtt{)}) is also balanced. If the bracket sequences (A) and (B) are balanced, then the concatenated sequence (A B) is also balanced. You are the head of the department for combating balanced bracket sequences, and your main task is to determine which brackets you can destroy and which you cannot. You are given a balanced bracket sequence represented by a string (s), consisting of the characters ( and ) . Since the robots' capabilities are not limitless, they can remove exactly one opening bracket and exactly one closing bracket from the string. Your task is to determine whether the robots can delete such two brackets so that the string (s) is no longer a balanced bracket sequence. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. Each test case consists of a single string (s) ((2 \leq |s| \leq 2 \cdot 10^5)) — a sequence of the characters ( and ) . It is guaranteed that (s) is a balanced bracket sequence. It is also guaranteed that the sum of (|s|) across all test cases does not exceed (2\cdot 10^5). For each test case, output " YES " if the robots can make the string stop being a balanced bracket sequence, and " NO " otherwise. You may output each letter in any case (lowercase or uppercase). For example, the strings " yEs ", " yes ", " Yes ", and " YES " will be accepted as a positive answer. In the first test case, it can be shown that the robots will not be able to break the correct bracket sequence. In the second test case, one of the options for removing brackets is as follows: $$$(())\color{red}{

Tutorials

Codeforces Round 1026 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
321196147 Phoenix_petrel B May 25, 2025, 5:16 a.m. OK C++17 (GCC 7-32) TESTS 8 31 0
321174827 huluwan B May 24, 2025, 11:44 p.m. OK C++17 (GCC 7-32) TESTS 8 31 819200
321200818 hardikkaurav7 B May 25, 2025, 6:05 a.m. OK C++17 (GCC 7-32) TESTS 8 46 0
321200441 yogeshkumar01 B May 25, 2025, 6:01 a.m. OK C++17 (GCC 7-32) TESTS 8 46 0
321200209 bittu27 B May 25, 2025, 5:59 a.m. OK C++17 (GCC 7-32) TESTS 8 46 0
321200117 road_to_gmiitr B May 25, 2025, 5:58 a.m. OK C++17 (GCC 7-32) TESTS 8 46 0
321198309 pushp_deep B May 25, 2025, 5:39 a.m. OK C++17 (GCC 7-32) TESTS 8 46 0
321194714 pujith_k B May 25, 2025, 4:59 a.m. OK C++17 (GCC 7-32) TESTS 8 46 0
321190972 amoeba B May 25, 2025, 4:08 a.m. OK C++17 (GCC 7-32) TESTS 8 46 0
321190523 cola_1 B May 25, 2025, 4:02 a.m. OK C++17 (GCC 7-32) TESTS 8 46 0
321195049 kairk B May 25, 2025, 5:03 a.m. OK C++20 (GCC 13-64) TESTS 8 31 0
321183591 pkm_1226 B May 25, 2025, 1:53 a.m. OK C++20 (GCC 13-64) TESTS 8 31 102400
321200162 IKUN_111 B May 25, 2025, 5:59 a.m. OK C++20 (GCC 13-64) TESTS 8 46 0
321199384 MDZUNAIDHOSSAIN B May 25, 2025, 5:51 a.m. OK C++20 (GCC 13-64) TESTS 8 46 0
321199153 treddytech07 B May 25, 2025, 5:49 a.m. OK C++20 (GCC 13-64) TESTS 8 46 0
321198776 alt.out B May 25, 2025, 5:45 a.m. OK C++20 (GCC 13-64) TESTS 8 46 0
321198609 ssd_newbie B May 25, 2025, 5:43 a.m. OK C++20 (GCC 13-64) TESTS 8 46 0
321198454 yuanyi B May 25, 2025, 5:41 a.m. OK C++20 (GCC 13-64) TESTS 8 46 0
321197758 its_preppin_time B May 25, 2025, 5:34 a.m. OK C++20 (GCC 13-64) TESTS 8 46 0
321197490 uditsh03 B May 25, 2025, 5:31 a.m. OK C++20 (GCC 13-64) TESTS 8 46 0
321175141 noxjeet B May 24, 2025, 11:55 p.m. OK C++23 (GCC 14-64, msys2) TESTS 8 31 0
321166996 farhan1717 B May 24, 2025, 8:21 p.m. OK C++23 (GCC 14-64, msys2) TESTS 8 31 0
321200734 slashTeen B May 25, 2025, 6:04 a.m. OK C++23 (GCC 14-64, msys2) TESTS 8 46 0
321199980 SamarMahfooz B May 25, 2025, 5:57 a.m. OK C++23 (GCC 14-64, msys2) TESTS 8 46 0
321199215 khush07 B May 25, 2025, 5:49 a.m. OK C++23 (GCC 14-64, msys2) TESTS 8 46 0
321198993 khalifhadance B May 25, 2025, 5:47 a.m. OK C++23 (GCC 14-64, msys2) TESTS 8 46 0
321196298 huyhuyne B May 25, 2025, 5:17 a.m. OK C++23 (GCC 14-64, msys2) TESTS 8 46 0
321196096 wWwWw233 B May 25, 2025, 5:15 a.m. OK C++23 (GCC 14-64, msys2) TESTS 8 46 0
321194420 juni-arjun B May 25, 2025, 4:55 a.m. OK C++23 (GCC 14-64, msys2) TESTS 8 46 0
321193513 LinGu B May 25, 2025, 4:43 a.m. OK C++23 (GCC 14-64, msys2) TESTS 8 46 0
321151013 _.vahzir B May 24, 2025, 5:43 p.m. OK GNU C11 TESTS 8 61 307200
321140451 monish1406 B May 24, 2025, 4:29 p.m. OK GNU C11 TESTS 8 62 307200
321138770 D1phu B May 24, 2025, 4:26 p.m. OK GNU C11 TESTS 8 62 1126400
321143430 Fasterhand539 B May 24, 2025, 4:33 p.m. OK GNU C11 TESTS 8 77 307200
321150382 erkanf B May 24, 2025, 5:38 p.m. OK GNU C11 TESTS 8 93 204800
321186624 roy1012 B May 25, 2025, 2:57 a.m. OK GNU C11 TESTS 8 93 307200
321144452 Cessdav B May 24, 2025, 4:34 p.m. OK GNU C11 TESTS 8 93 307200
321140241 kurumijeager B May 24, 2025, 4:29 p.m. OK GNU C11 TESTS 8 93 1024000
321152272 StraightclinE B May 24, 2025, 5:51 p.m. OK GNU C11 TESTS 8 109 409600
321176660 dils2k B May 25, 2025, 12:24 a.m. OK Go TESTS 8 46 4812800
321175469 aparimeet B May 25, 2025, 12:07 a.m. OK Go TESTS 8 187 1433600
321181184 yillin B May 25, 2025, 1:16 a.m. OK Go TESTS 8 218 1331200
321139357 ramthokane B May 24, 2025, 4:27 p.m. OK Java 21 TESTS 8 218 921600
321183210 IvyReverie B May 25, 2025, 1:43 a.m. OK Java 21 TESTS 8 233 1024000
321151662 idip B May 24, 2025, 5:47 p.m. OK Java 21 TESTS 8 234 614400
321148142 sad_truant B May 24, 2025, 5:25 p.m. OK Java 21 TESTS 8 234 614400
321152956 Vivekforces965421 B May 24, 2025, 5:57 p.m. OK Java 21 TESTS 8 249 307200
321193116 prathamsmalagi B May 25, 2025, 4:38 a.m. OK Java 21 TESTS 8 249 921600
321151578 ikiku B May 24, 2025, 5:46 p.m. OK Java 21 TESTS 8 249 1126400
321161432 akshat.codes B May 24, 2025, 7:14 p.m. OK Java 21 TESTS 8 264 1024000
321155766 divya8080 B May 24, 2025, 6:19 p.m. OK Java 21 TESTS 8 265 614400
321139029 optimistic_Euler B May 24, 2025, 4:27 p.m. OK Java 21 TESTS 8 265 614400
321143546 Akshat_9205 B May 24, 2025, 4:34 p.m. OK Java 8 TESTS 8 155 0
321147557 aaryanman05 B May 24, 2025, 5:22 p.m. OK Java 8 TESTS 8 171 0
321199197 not_mohith B May 25, 2025, 5:49 a.m. OK Java 8 TESTS 8 202 0
321198619 agrawalvishal2806 B May 25, 2025, 5:43 a.m. OK Java 8 TESTS 8 202 0
321138611 yashu_rai B May 24, 2025, 4:26 p.m. OK Java 8 TESTS 8 202 0
321160554 Kazuuu B May 24, 2025, 7:04 p.m. OK Java 8 TESTS 8 203 0
321166173 Shafat04 B May 24, 2025, 8:10 p.m. OK Java 8 TESTS 8 218 0
321150689 NischayCodes B May 24, 2025, 5:40 p.m. OK Java 8 TESTS 8 218 0
321150490 vive02-xo B May 24, 2025, 5:39 p.m. OK Java 8 TESTS 8 218 0
321143559 wydwyd0101 B May 24, 2025, 4:34 p.m. OK Java 8 TESTS 8 218 0
321164395 HowOld B May 24, 2025, 7:47 p.m. OK Kotlin 1.9 TESTS 8 140 0
321143576 iitamansharma B May 24, 2025, 4:34 p.m. OK Kotlin 1.9 TESTS 8 186 0
321151243 v_krystle B May 24, 2025, 5:44 p.m. OK Node.js TESTS 8 233 10752000
321138711 _gaurav_3043 B May 24, 2025, 4:26 p.m. OK PyPy 3 TESTS 8 171 4915200
321147926 yashsolanki2007 B May 24, 2025, 5:24 p.m. OK PyPy 3 TESTS 8 202 5529600
321175569 Listar B May 25, 2025, 12:10 a.m. OK PyPy 3 TESTS 8 202 5836800
321149313 cant_codeTM B May 24, 2025, 5:32 p.m. OK PyPy 3 TESTS 8 202 6348800
321138421 pranjalisharma6543 B May 24, 2025, 4:26 p.m. OK PyPy 3-64 TESTS 8 77 2969600
321164948 bravotango B May 24, 2025, 7:53 p.m. OK PyPy 3-64 TESTS 8 92 2457600
321163522 bravotango B May 24, 2025, 7:36 p.m. OK PyPy 3-64 TESTS 8 93 2560000
321163366 bravotango B May 24, 2025, 7:35 p.m. OK PyPy 3-64 TESTS 8 93 3174400
321150146 Creydit B May 24, 2025, 5:37 p.m. OK PyPy 3-64 TESTS 8 93 3788800
321161496 rmr B May 24, 2025, 7:15 p.m. OK PyPy 3-64 TESTS 8 93 5120000
321161176 rmr B May 24, 2025, 7:11 p.m. OK PyPy 3-64 TESTS 8 93 11980800
321165741 bravotango B May 24, 2025, 8:04 p.m. OK PyPy 3-64 TESTS 8 108 2662400
321165554 bravotango B May 24, 2025, 8:01 p.m. OK PyPy 3-64 TESTS 8 108 2662400
321139852 F13monster B May 24, 2025, 4:28 p.m. OK PyPy 3-64 TESTS 8 108 3174400
321163698 polanskiefrain7 B May 24, 2025, 7:38 p.m. OK Python 2 TESTS 8 77 2560000
321142488 0-dayCoder B May 24, 2025, 4:32 p.m. OK Python 3 TESTS 8 77 716800
321140792 GaniGursac B May 24, 2025, 4:29 p.m. OK Python 3 TESTS 8 77 716800
321140758 _cicada_3301 B May 24, 2025, 4:29 p.m. OK Python 3 TESTS 8 77 921600
321138213 SyneRgy21 B May 24, 2025, 4:25 p.m. OK Python 3 TESTS 8 77 921600
321144338 JuvelMusick B May 24, 2025, 4:34 p.m. OK Python 3 TESTS 8 92 921600
321158857 amit_gkp B May 24, 2025, 6:47 p.m. OK Python 3 TESTS 8 93 614400
321199332 Yash1290 B May 25, 2025, 5:50 a.m. OK Python 3 TESTS 8 93 716800
321140067 DiaaRabottini B May 24, 2025, 4:28 p.m. OK Python 3 TESTS 8 93 716800
321138634 aashu358 B May 24, 2025, 4:26 p.m. OK Python 3 TESTS 8 93 716800
321137772 EnosMaysa29 B May 24, 2025, 4:24 p.m. OK Python 3 TESTS 8 93 819200
321171920 SnowballSH B May 24, 2025, 10:02 p.m. OK Rust 2021 TESTS 8 62 0
321159017 hodor12 B May 24, 2025, 6:48 p.m. OK Rust 2021 TESTS 8 62 0
321156211 no_ether B May 24, 2025, 6:22 p.m. OK Rust 2021 TESTS 8 62 102400

remove filters

Back to search problems