func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 0x6fffffff;   const int MINF = 0x80000000;   const long long mod = 1000000007;   const int cons = 100001;   const double pi = 3.141592653589793;   vector<int> pos;   bool isOk(int x, int t) {     double res = 0;     for (int i = 1; i < pos.size(); i++) {       int diff = pos[i] - pos[i - 1];       int l = -1;       int r = x + 1;       while (l + 1 < r) {         int mid = l + r >> 1;         int y = x - mid;         double avail = (double)y / 2 + mid;         if (avail >= (double)diff)           r = mid;         else           l = mid;       }       if (r == x + 1) return false;       diff -= r;       res += (double)r * 2;       res += min((double)diff, ((double)x - r) / 2);     }     return res <= (double)t;   }   int main() {     int n, k, s, t;     cin >> n >> k >> s >> t;     map<int, int> M;     for (int i = 0; i < n; i++) {       int c, v;       scanf( %d%d , &c, &v);       M[c] = max(M[c], v);     }     int cur = 0;     vector<pair<int, int> > dat;     for (auto it : M) {       if (cur < it.second) {         cur = it.second;         dat.push_back(it);       }     }     pos.resize(k);     for (int i = 0; i < k; i++) {       scanf( %d , &pos[i]);     }     pos.push_back(0);     pos.push_back(s);     sort(pos.begin(), pos.end());     int L = -1;     int R = dat.size();     while (L + 1 < R) {       int mid = L + R >> 1;       if (isOk(dat[mid].second, t))         R = mid;       else         L = mid;     }     if (R == dat.size())       puts( -1 );     else       printf( %d n , dat[R].first);     return 0;   }   