cf/mirror

Almost Regular Bracket Sequence

CF
1095E1900· candidate master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
6
(((())
Output
3
Sample 2of 4
Input
6
()()()
Output
0
Sample 3of 4
Input
1
)
Output
0
Sample 4of 4
Input
8
)))(((((
Output
0
1095E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)