func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 10005;   short dp[MAXN][MAXN];   int32_t main() {     ios::sync_with_stdio(false);     string s, t;     cin >> s >> t;     dp[0][0] = 0;     int n = s.size(), m = t.size();     for (int i = 0; i <= n + 3; i++)       for (int j = 0; j <= m + 3; j++) dp[i][j] = MAXN;     dp[0][0] = 0;     vector<int> prv(n + 1, -1);     vector<int> wh(2 * n + 1, -1);     wh[n] = 0;     for (int i = 1, v = 0; i <= n; i++) {       v += (s[i - 1] ==  .  ? -1 : 1);       if (s[i - 1] ==  .  && wh[v + n] != -1) prv[i] = wh[v + n];       wh[v + n] = i;     }     for (int i = 1; i <= n; i++) {       for (int j = 0; j <= m; j++) {         if (j > 0 && s[i - 1] == t[j - 1]) dp[i][j] = dp[i - 1][j - 1];         if (s[i - 1] ==  . ) dp[i][j] = dp[i - 1][j + 1];         dp[i][j] = min(dp[i][j], (short)(dp[i - 1][j] + 1));         if (prv[i] != -1) dp[i][j] = min(dp[i][j], dp[prv[i]][j]);       }     }     cout << dp[n][m] <<   n ;   }   