voidDeal_LR() { for(int i = 1; i <= m; i++) { if(s[i] == ')' && stk[top] == '(') top--; else stk[++top] = s[i]; }
for(int i = 1; i <= top; i++) if(stk[i] == '(') L++; else R++; }
intmain() { n = get(); m = get(); need = n - m; scanf("%s", s + 1);
Deal_f(), Deal_LR();
Ans = 0; for(int i = 0; i <= need; i++) for(int num = 0; num <= need; num++)//left's L if(R + num < 2005 && L + num < 2005) Ans = (Ans + (s64)f[i][R + num] * f[need - i][L + num] % MOD) % MOD;