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.
Problems
B'A bracket sequence is a string consisting of characters '( ' and/or ') '. 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 bracket sequence s ; let 's define its length as n . Your task is to find a regular bracket sequence t of length 2n such that s does not occur in t as a contiguous substring, or report that there is no such sequence. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. The only line of each test case contains a string s ( 2 <= |s| <= 50 ), consisting of characters "(" and/or ")". For each test case, print the answer to it. If there is no required regular bracket sequence, print NO in a separate line. Otherwise, print YES in the first line, and the required regular bracket sequence t itself in the second line. If there are multiple answers -- you may print any of them. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
219383704 |
bluemegane |
A |
Aug. 18, 2023, 12:42 a.m. |
OK |
C# 8 |
TESTS |
3 |
77 |
819200 |
|
|
219357711 |
HARDIKKELOTRA |
A |
Aug. 17, 2023, 5:51 p.m. |
OK |
GNU C11 |
TESTS |
3 |
202 |
0 |
|
|
219353975 |
WASIF_74 |
A |
Aug. 17, 2023, 5:21 p.m. |
OK |
GNU C11 |
TESTS |
3 |
234 |
0 |
|
|
219353044 |
Brain_dull_munir08 |
A |
Aug. 17, 2023, 5:15 p.m. |
OK |
GNU C11 |
TESTS |
3 |
249 |
0 |
|
|
219349813 |
jmawa1163 |
A |
Aug. 17, 2023, 4:56 p.m. |
OK |
GNU C11 |
TESTS |
3 |
374 |
0 |
|
|
219380655 |
Coder_Fang |
A |
Aug. 17, 2023, 11:10 p.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219367021 |
Saivarun |
A |
Aug. 17, 2023, 7:23 p.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219388424 |
Swing1 |
A |
Aug. 18, 2023, 2:12 a.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219386512 |
2021404292 |
A |
Aug. 18, 2023, 1:39 a.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219386317 |
SPACE016 |
A |
Aug. 18, 2023, 1:35 a.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219386237 |
tonysiyutao |
A |
Aug. 18, 2023, 1:34 a.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219385687 |
wyfryj210414 |
A |
Aug. 18, 2023, 1:24 a.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219404111 |
chilly_river |
A |
Aug. 18, 2023, 5:54 a.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219396165 |
yuhang888 |
A |
Aug. 18, 2023, 4:12 a.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219394256 |
I_WILL_AK_ |
A |
Aug. 18, 2023, 3:44 a.m. |
OK |
GNU C++14 |
TESTS |
3 |
0 |
0 |
|
|
219383301 |
tranducbo |
A |
Aug. 18, 2023, 12:31 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219377538 |
Black_dot_13 |
A |
Aug. 17, 2023, 9:46 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219372497 |
Shubha_Error |
A |
Aug. 17, 2023, 8:37 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219372494 |
enslaved |
A |
Aug. 17, 2023, 8:37 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219369137 |
Victor_Luis123 |
A |
Aug. 17, 2023, 7:48 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219367931 |
h_arnoldsw |
A |
Aug. 17, 2023, 7:33 p.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219398522 |
oryxx |
A |
Aug. 18, 2023, 4:45 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219397786 |
shadow9236 |
A |
Aug. 18, 2023, 4:35 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219388991 |
WFeng |
A |
Aug. 18, 2023, 2:23 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219384063 |
Mirx_ |
A |
Aug. 18, 2023, 12:50 a.m. |
OK |
GNU C++17 |
TESTS |
3 |
0 |
0 |
|
|
219404795 |
rehanmm |
A |
Aug. 18, 2023, 6:02 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219401066 |
Teranj |
A |
Aug. 18, 2023, 5:17 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219400172 |
tditya_aeltia |
A |
Aug. 18, 2023, 5:06 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219395767 |
stan23456 |
A |
Aug. 18, 2023, 4:06 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219393885 |
Once_I_Liked_AGirl |
A |
Aug. 18, 2023, 3:38 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219389266 |
fanhuaxingyu |
A |
Aug. 18, 2023, 2:26 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219383866 |
obss |
A |
Aug. 18, 2023, 12:46 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219383636 |
Ashlyn |
A |
Aug. 18, 2023, 12:40 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219383589 |
jk1024 |
A |
Aug. 18, 2023, 12:39 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219382855 |
yrhiba |
A |
Aug. 18, 2023, 12:19 a.m. |
OK |
GNU C++17 (64) |
TESTS |
3 |
0 |
0 |
|
|
219402890 |
Gourab_Chatterjee |
A |
Aug. 18, 2023, 5:39 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219402556 |
Ality129 |
A |
Aug. 18, 2023, 5:35 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219402368 |
MuhammedMagdy |
A |
Aug. 18, 2023, 5:33 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219401994 |
wenjiaweiii |
A |
Aug. 18, 2023, 5:29 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219401910 |
asaecs2 |
A |
Aug. 18, 2023, 5:28 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219401518 |
_wh |
A |
Aug. 18, 2023, 5:23 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219403515 |
omp10 |
A |
Aug. 18, 2023, 5:47 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219403552 |
MuhammedMagdy |
A |
Aug. 18, 2023, 5:47 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219404245 |
Intolerable_Emu |
A |
Aug. 18, 2023, 5:56 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219404464 |
11_45_14 |
A |
Aug. 18, 2023, 5:58 a.m. |
OK |
GNU C++20 (64) |
TESTS |
3 |
0 |
0 |
|
|
219347332 |
hzEnv |
A |
Aug. 17, 2023, 4:44 p.m. |
OK |
Go |
TESTS |
3 |
30 |
5017600 |
|
|
219377356 |
cohadar |
A |
Aug. 17, 2023, 9:42 p.m. |
OK |
Go |
TESTS |
3 |
31 |
409600 |
|
|
219360914 |
wintersoldier2004 |
A |
Aug. 17, 2023, 6:19 p.m. |
OK |
Java 11 |
TESTS |
3 |
171 |
0 |
|
|
219352935 |
polsage |
A |
Aug. 17, 2023, 5:14 p.m. |
OK |
Java 11 |
TESTS |
3 |
171 |
0 |
|
|
219355285 |
jooncco |
A |
Aug. 17, 2023, 5:31 p.m. |
OK |
Java 11 |
TESTS |
3 |
186 |
0 |
|
|
219399883 |
legit_123 |
A |
Aug. 18, 2023, 5:03 a.m. |
OK |
Java 11 |
TESTS |
3 |
186 |
6963200 |
|
|
219355381 |
prac_123 |
A |
Aug. 17, 2023, 5:32 p.m. |
OK |
Java 11 |
TESTS |
3 |
187 |
0 |
|
|
219401078 |
legit_123 |
A |
Aug. 18, 2023, 5:18 a.m. |
OK |
Java 11 |
TESTS |
3 |
187 |
6963200 |
|
|
219365632 |
creativegiant |
A |
Aug. 17, 2023, 7:08 p.m. |
OK |
Java 11 |
TESTS |
3 |
202 |
0 |
|
|
219354690 |
Harwinvanak |
A |
Aug. 17, 2023, 5:26 p.m. |
OK |
Java 11 |
TESTS |
3 |
202 |
0 |
|
|
219350368 |
dilip_2512 |
A |
Aug. 17, 2023, 4:58 p.m. |
OK |
Java 11 |
TESTS |
3 |
217 |
0 |
|
|
219355633 |
Harwinvanak |
A |
Aug. 17, 2023, 5:34 p.m. |
OK |
Java 11 |
TESTS |
3 |
218 |
0 |
|
|
219349338 |
ahmed.elbakly |
A |
Aug. 17, 2023, 4:53 p.m. |
OK |
Java 17 |
TESTS |
3 |
156 |
716800 |
|
|
219353282 |
swatishivam23 |
A |
Aug. 17, 2023, 5:16 p.m. |
OK |
Java 17 |
TESTS |
3 |
170 |
307200 |
|
|
219354703 |
akjhaa1508 |
A |
Aug. 17, 2023, 5:27 p.m. |
OK |
Java 17 |
TESTS |
3 |
171 |
409600 |
|
|
219347293 |
2745810964z |
A |
Aug. 17, 2023, 4:44 p.m. |
OK |
Java 17 |
TESTS |
3 |
186 |
409600 |
|
|
219349244 |
thatsiddharth |
A |
Aug. 17, 2023, 4:53 p.m. |
OK |
Java 17 |
TESTS |
3 |
186 |
512000 |
|
|
219345291 |
yugam_04 |
A |
Aug. 17, 2023, 4:37 p.m. |
OK |
Java 17 |
TESTS |
3 |
202 |
0 |
|
|
219397040 |
sumit2018das2004 |
A |
Aug. 18, 2023, 4:24 a.m. |
OK |
Java 17 |
TESTS |
3 |
202 |
409600 |
|
|
219385029 |
nikh94 |
A |
Aug. 18, 2023, 1:11 a.m. |
OK |
Java 17 |
TESTS |
3 |
202 |
614400 |
|
|
219357178 |
maurya.rahul682 |
A |
Aug. 17, 2023, 5:46 p.m. |
OK |
Java 17 |
TESTS |
3 |
217 |
0 |
|
|
219365855 |
Swilled7 |
A |
Aug. 17, 2023, 7:11 p.m. |
OK |
Java 17 |
TESTS |
3 |
217 |
614400 |
|
|
219355816 |
ankit_0207 |
A |
Aug. 17, 2023, 5:35 p.m. |
OK |
Java 8 |
TESTS |
3 |
92 |
0 |
|
|
219400032 |
gdax |
A |
Aug. 18, 2023, 5:04 a.m. |
OK |
Java 8 |
TESTS |
3 |
93 |
0 |
|
|
219404875 |
Autunomy |
A |
Aug. 18, 2023, 6:03 a.m. |
OK |
Java 8 |
TESTS |
3 |
109 |
0 |
|
|
219349466 |
__Aviral__ |
A |
Aug. 17, 2023, 4:54 p.m. |
OK |
Java 8 |
TESTS |
3 |
139 |
0 |
|
|
219348521 |
RG_Kronos |
A |
Aug. 17, 2023, 4:49 p.m. |
OK |
Java 8 |
TESTS |
3 |
156 |
0 |
|
|
219358137 |
hamossa |
A |
Aug. 17, 2023, 5:54 p.m. |
OK |
Java 8 |
TESTS |
3 |
295 |
0 |
|
|
219370445 |
Sumitsingh7 |
A |
Aug. 17, 2023, 8:07 p.m. |
OK |
Java 8 |
TESTS |
3 |
405 |
0 |
|
|
219345470 |
TheWillingBird |
A |
Aug. 17, 2023, 4:37 p.m. |
OK |
Kotlin 1.7 |
TESTS |
3 |
233 |
24371200 |
|
|
219391040 |
DerelictX |
A |
Aug. 18, 2023, 2:56 a.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
15 |
0 |
|
|
219371927 |
Zenocr735 |
A |
Aug. 17, 2023, 8:29 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
15 |
0 |
|
|
219366328 |
BMW_CS_ |
A |
Aug. 17, 2023, 7:16 p.m. |
OK |
MS C++ 2017 |
TESTS |
3 |
15 |
0 |
|
|
219345042 |
osato |
A |
Aug. 17, 2023, 4:36 p.m. |
OK |
Node.js |
TESTS |
3 |
77 |
1638400 |
|
|
219387113 |
ramab |
A |
Aug. 18, 2023, 1:49 a.m. |
OK |
PyPy 3 |
TESTS |
3 |
92 |
2662400 |
|
|
219360328 |
giuliomanuzzi |
A |
Aug. 17, 2023, 6:13 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
93 |
2252800 |
|
|
219351617 |
append._code |
A |
Aug. 17, 2023, 5:05 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
124 |
3686400 |
|
|
219385599 |
okay4869 |
A |
Aug. 18, 2023, 1:22 a.m. |
OK |
PyPy 3 |
TESTS |
3 |
139 |
3072000 |
|
|
219346670 |
udaypnayar |
A |
Aug. 17, 2023, 4:41 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
140 |
3686400 |
|
|
219392977 |
34543534545 |
A |
Aug. 18, 2023, 3:25 a.m. |
OK |
PyPy 3 |
TESTS |
3 |
155 |
2969600 |
|
|
219355766 |
sky_coder_ |
A |
Aug. 17, 2023, 5:35 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
155 |
3174400 |
|
|
219343433 |
geethapriyanka |
A |
Aug. 17, 2023, 4:33 p.m. |
OK |
PyPy 3 |
TESTS |
3 |
155 |
3379200 |
|
|
219387915 |
Yeaish_Turj |
A |
Aug. 18, 2023, 2:03 a.m. |
OK |
PyPy 3 |
TESTS |
3 |
186 |
6348800 |
|
|
219377218 |
oneku16 |
A |
Aug. 17, 2023, 9:39 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
46 |
102400 |
|
|
219355720 |
khalit7 |
A |
Aug. 17, 2023, 5:35 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
61 |
3584000 |
|
|
219352238 |
lean1 |
A |
Aug. 17, 2023, 5:10 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
62 |
3174400 |
|
|
219398007 |
Youarenotgood |
A |
Aug. 18, 2023, 4:38 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
77 |
3481600 |
|
|
219390593 |
InHng |
A |
Aug. 18, 2023, 2:49 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
77 |
3481600 |
|
|
219344915 |
mas_sa |
A |
Aug. 17, 2023, 4:36 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
77 |
3481600 |
|
|
219351905 |
dhruv_18 |
A |
Aug. 17, 2023, 5:07 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
77 |
3584000 |
|
|
219347791 |
gardengnome |
A |
Aug. 17, 2023, 4:46 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
77 |
3584000 |
|
|
219394102 |
tryGrind |
A |
Aug. 18, 2023, 3:41 a.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
93 |
4198400 |
|
|
219351751 |
the_last_smilodon |
A |
Aug. 17, 2023, 5:06 p.m. |
OK |
PyPy 3-64 |
TESTS |
3 |
93 |
6041600 |
|
|
219396448 |
21wh1a0238 |
A |
Aug. 18, 2023, 4:16 a.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
219396085 |
160220a006 |
A |
Aug. 18, 2023, 4:11 a.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
219394095 |
wake__up |
A |
Aug. 18, 2023, 3:41 a.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
219363106 |
XhaXhed |
A |
Aug. 17, 2023, 6:40 p.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
219349270 |
Riyajulhasan |
A |
Aug. 17, 2023, 4:53 p.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
219349206 |
alvin369 |
A |
Aug. 17, 2023, 4:52 p.m. |
OK |
Python 3 |
TESTS |
3 |
30 |
0 |
|
|
219400448 |
Emira |
A |
Aug. 18, 2023, 5:09 a.m. |
OK |
Python 3 |
TESTS |
3 |
31 |
0 |
|
|
219397074 |
poojitha8096 |
A |
Aug. 18, 2023, 4:25 a.m. |
OK |
Python 3 |
TESTS |
3 |
31 |
0 |
|
|
219396442 |
Black_Killer |
A |
Aug. 18, 2023, 4:16 a.m. |
OK |
Python 3 |
TESTS |
3 |
31 |
0 |
|
|
219392956 |
janitw |
A |
Aug. 18, 2023, 3:25 a.m. |
OK |
Python 3 |
TESTS |
3 |
31 |
0 |
|
|
219383006 |
AkagiYuu |
A |
Aug. 18, 2023, 12:23 a.m. |
OK |
Rust 2021 |
TESTS |
3 |
0 |
0 |
|
|
219382785 |
ilyshana |
A |
Aug. 18, 2023, 12:17 a.m. |
OK |
Rust 2021 |
TESTS |
3 |
0 |
0 |
|
|
219343702 |
chakradharr165 |
A |
Aug. 17, 2023, 4:34 p.m. |
OK |
Rust 2021 |
TESTS |
3 |
30 |
0 |
|
|
219397673 |
kiddoos |
A |
Aug. 18, 2023, 4:33 a.m. |
OK |
Rust 2021 |
TESTS |
3 |
31 |
0 |
|
|
remove filters
Back to search problems