func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 6010;   const int mod = 1000000007;   int n;   long long k[MAXN], k2[MAXN];   int main() {     string asd;     string asd2;     cin >> asd;     cin >> asd2;     n = ((int)(asd2.size()));     long long res = 0;     for (int i = 0; i < ((int)(asd.size())); i++) {       for (int j = 0; j < ((int)(asd2.size())); j++) {         if (asd2[j] == asd[i]) {           k2[j] = (k2[j] + k[j - 1] + 1) % mod;         }         k2[j + 1] = (k2[j + 1] + k2[j]) % mod;       }       res = (res + k2[n]) % mod;       for (int j = 0; j < ((int)(asd2.size())); j++) k[j] = k2[j];       memset(k2, 0, sizeof k2);     }     cout << res << endl;     return 0;   }   