func_code_string: #include <bits/stdc++.h>   long long mod = 1e9 + 7;   int main() {     long long n, m;     std::cin >> n >> m;     std::string s;     std::cin >> s;     std::vector<std::vector<long long>> dp(n - m + 1,                                            std::vector<long long>(n - m + 1));     dp[0][0] = 1;     for (long long i = 1; i < n - m + 1; ++i)       for (long long j = 0; j < n - m + 1; ++j) {         dp[i][j] = 0;         if (j > 0) dp[i][j] += dp[i - 1][j - 1];         if (j < n - m) dp[i][j] += dp[i - 1][j + 1];         dp[i][j] %= mod;       }     long long min = 0, balance = 0;     for (long long i = 0; i < m; ++i)       if (s[i] ==  ( )         ++balance;       else if (--balance < min)         min = balance;     long long res = 0;     for (long long left = 0; left <= n - m; ++left)       for (long long here = -min; here <= left; ++here)         if (here + balance <= n - m - left)           res = (res + dp[left][here] * dp[n - m - left][here + balance]) % mod;     std::cout << res;     return 0;   }   