func_code_string: #include <bits/stdc++.h>   using namespace std;   int dx[] = {0, 0, 1, -1};   int dy[] = {1, -1, 0, 0};   int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};   int dy8[] = {1, -1, -1, 0, 1, -1, 0, 1};   long long bigmod(long long a, long long b, long long c) {     if (b == 0) return 1 % c;     long long x = bigmod(a, b / 2, c);     x = x * x % c;     if (b % 2 == 1) x = x * a % c;     return x;   }   long long mod_inverse(long long a, long long mod) {     return bigmod(a, mod - 2, mod);   }   const int M = 100005 * 2;   int dp[M], dpp[M], sum[27][M * 4], n, m;   string s, p;   void update(int id, int l, int r, int k, int L, int val) {     if (l == r) {       sum[id][k] = val;       return;     }     int mid = (l + r) / 2;     if (mid >= L) {       update(id, l, mid, k * 2, L, val);     } else {       update(id, mid + 1, r, k * 2 + 1, L, val);     }     sum[id][k] = min(sum[id][k * 2], sum[id][k * 2 + 1]);   }   int query(int id, int l, int r, int k, int L, int R) {     if (l > R || r < L) return 2134567891;     if (l >= L && r <= R) return sum[id][k];     int mid = (l + r) / 2;     return min(query(id, l, mid, k * 2, L, R),                query(id, mid + 1, r, k * 2 + 1, L, R));   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cin >> s >> p;     n = s.size();     m = p.size();     s =  #  + s;     p =  #  + p;     int cnt = 0, ptr = 1;     for (int i = 1; i <= n; i++) {       if (ptr <= m && s[i] == p[ptr]) {         cnt++;         ptr++;       }       dp[i] = cnt;     }     cnt = 0, ptr = m;     for (int i = n; i >= 1; i--) {       if (ptr >= 1 && s[i] == p[ptr]) {         ptr--;         cnt++;       }       dpp[i] = cnt;     }     for (int i = 0; i < 26; i++) {       for (int j = 0; j < 4 * M; j++) sum[i][j] = 2134567891;     }     int N = max(n, m);     for (int i = 1; i <= m; i++) {       int lcnt = i - 1;       int rcnt = m - i;       int id = p[i] -  a ;       update(id, 1, N, 1, lcnt + 1, rcnt);     }     for (int i = 1; i <= n; i++) {       int id = s[i] -  a ;       int ret = query(id, 1, N, 1, 1, dp[i - 1] + 1);       if (ret <= dpp[i + 1]) continue;       cout <<  No  << endl;       return 0;     }     cout <<  Yes  << endl;     return 0;   }   