Brackets all over

I AM HAVING TROUBLE WITH WHAT THE QUESTION DEMANDS
I MEAN
IN THE GIVEN TEST CASE a ="" can be if required so can i have a string as")) " i.e with a space after the 2 closed brackets and

can there be a case where a="" and b="" basically both NULL ,should i consider this case

qn link
https://hack.codingblocks.com/contests/c/512/1080

I m not getting your problem.

should i consider the case when a=null and b=null

why am i getting run error for this case
4 2
))
my code:
https://ide.codingblocks.com/s/43100

qn link:
https://hack.codingblocks.com/contests/c/512/1080 1

Runtime error is because you are calling for v.back() for else if part, and initially for this case, v is empty. So this will produce a runtime error.

can u please give me some test cases along with their answer cause i cant understand the qn completely

this is my code it works fine but the only problem is that how do i give the answer after calculating n.o of u know the places left that will be fulfilled by the string a and b
https://ide.codingblocks.com/s/43175

https://hack.codingblocks.com/contests/c/512/1080

Some cases i can think of are:

4 2
((
answer is 1 as only answer possible is (())
6 4
)()(
answer is 1 again and only answer possible is ()()()
6 2
((
answer is 3. (())(), ((())) and ()(()).

6 2
))
Your code’s output: 2
Expected Output: 3.

5 2
))
Your code’s output: 2
Expected Output: 0

https://ide.codingblocks.com/s/43455

This is my solution for this question. This is correct according to me. Please verify @sanjeetboora @Anubhav-Aron-1353657 @sss
Do let me know in case my code is wrong or the test files are wrong.

Hey Abhishek, your code is not correct. Here is my DP solution for this problem, you can refer this code.

am having a hard time understanding steps in ur code as am a bit poor with dp so can u please add coments in ur code regarding the steps and what variable means what
please