func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 100100, INFTY = 0x3f3f3f3f;   int A[MAXN], B[MAXN];   vector<int> p[MAXN];   int posb[330];   int resp[330];   int main() {     int N, M, S, E;     posb[0] = 0;     resp[0] = 0;     for (int i = 1; i <= 300; i++) {       posb[i] = MAXN;       resp[i] = INFTY;     }     for (int i = 1; i <= MAXN - 100; i++) p[i].clear();     scanf( %d %d %d %d , &N, &M, &S, &E);     for (int i = 1; i <= N; i++) scanf( %d , &A[i]);     for (int i = 1; i <= M; i++) {       scanf( %d , &B[i]);       p[B[i]].push_back(i);     }     for (int i = 1; i <= 10000; i++) {       int tam = p[i].size();       if (tam == 0) continue;     }     for (int k = 1; k <= N; k++) {       int x = A[k];       for (int i = 299; i >= 0; i--) {         if (posb[i] == MAXN) continue;         int ini = posb[i] + 1;         int tam = p[x].size();         int prox = (lower_bound(&p[x][0], &p[x][tam], ini) - &p[x][0]);         if (prox == tam) continue;         posb[i + 1] = min(posb[i + 1], p[x][prox]);         resp[i + 1] = min(resp[i + 1], p[x][prox] + k);       }     }     int ans = 0;     for (int i = 0; i <= 300; i++) {       long long int qq = E, rr = S;       qq *= i;       qq += resp[i];       if (qq > rr) break;       ans = i;     }     printf( %d n , ans);     return 0;   }   