cf/mirror

Palindromic Parentheses

CF
1906L2500· grandmaster1s1024 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
6 4
Output
(())()
Sample 2of 4
Input
6 3
Output
(()())
Sample 3of 4
Input
4 1
Output
-1
Sample 4of 4
Input
14 11
Output
()((())()())()
1906L.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)