func_code_string: #include <bits/stdc++.h>   using namespace std;   long long X[(int)1e5 + 9];   long long C[(int)1e5 + 9];   int main() {     ios_base::sync_with_stdio(NULL);     cin.tie(NULL);     cout.tie(NULL);     long long n, k, a, c, cost;     cin >> n >> k;     for (int i = 1; i <= n; i++) {       cin >> X[i];     }     cin >> a;     for (int i = 1; i <= n; i++) {       cin >> C[i];     }     c = k;     priority_queue<long long, vector<long long>, greater<long long> > Q;     cost = 0;     bool ans_ase = true;     for (int i = 1; i <= n; i++) {       Q.push(C[i]);       if (c < X[i]) {         if (Q.size() * a + c >= X[i]) {           while (c < X[i]) {             c += a;             cost += Q.top();             Q.pop();           }         } else {           ans_ase = 0;           break;         }       }     }     if (ans_ase)       cout << cost <<   n ;     else       cout << -1 <<   n ;     return 0;   }   