func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 8;   int a[N], b[N];   int n, m;   long long x, k, y;   bool chk(int l, int r, long long &res) {     if (l > r) return true;     bool canDel = false;     int mx = *max_element(a + l, a + r + 1);     int len = r - l + 1;     if (l - 1 >= 0 && a[l - 1] > mx) canDel = true;     if (r + 1 < n && a[r + 1] > mx) canDel = true;     if (len < k && !canDel) return false;     int need = len % k;     res += need * y;     len -= need;     if (y * k >= x) {       res += len / k * x;     } else if (canDel) {       res += len * y;     } else {       res += (len - k) * y + x;     }     return true;   }   int main() {     cin >> n >> m >> x >> k >> y;     for (int i = 0; i < n; i++) cin >> a[i];     for (int i = 0; i < m; i++) cin >> b[i];     long long res = 0;     int lst = -1, posa = 0, posb = 0;     while (posb < m) {       while (posa < n && a[posa] != b[posb]) posa++;       if (posa == n) {         cout <<  -1 ;         return 0;       }       if (!chk(lst + 1, posa - 1, res)) {         cout <<  -1 ;         return 0;       }       lst = posa;       posb++;     }     if (!chk(lst + 1, n - 1, res)) {       cout <<  -1 ;       return 0;     }     cout << res;     return 0;   }   