http://codeforces.com/problemset/problem/5/C
Didn’t understood the meaning of:
“a bracket sequence is called regular, if by inserting «+» and «1» into it we can get a correct mathematical expression.”
In the example, «(())()» is regular. Is the answer would be 6 1 ?
In the sample test «)((())))(()())» is 6 2. I understood why its 6 2
but if the input had been «)((()))(()())» i.e. removing the bold ‘)’ in previous line, should the answer be 12 1 ?