func_code_string: #include <bits/stdc++.h>   using namespace std;   const int inf = 0x3f3f3f3f;   void err() { cout <<   033[39;0m  << endl; }   template <class T, class... Ts>   void err(const T& arg, const Ts&... args) {     cout << arg <<    ;     err(args...);   }   const int N = 100000 + 5;   int n, h, m, k;   int H[N];   pair<int, int> M[N];   int main() {     scanf( %d%d%d%d , &n, &h, &m, &k);     m /= 2;     for (int i = 1; i <= n; i++) {       scanf( %d%d , &H[i], &M[i].first);       M[i].second = i;       M[i].first %= m;       M[i].first++;     }     sort(M + 1, M + 1 + n);     int res = 0, t = 0;     for (int i = 1; i <= n; i++) {       int num = 0;       if (M[i].first < k) {         int l = lower_bound(M + 1, M + 1 + n, make_pair(M[i].first, 0)) - M;         int r =             upper_bound(M + 1, M + 1 + n, make_pair(m - k + M[i].first, inf)) -             M - 1;         num = r - l + 1;       } else {         num +=             upper_bound(M + 1, M + 1 + n, make_pair(M[i].first - k, inf)) - M - 1;         num +=             n - (lower_bound(M + 1, M + 1 + n, make_pair(M[i].first, 0)) - M) + 1;       }       if (res < num) {         res = num;         t = M[i].first;       }     }     vector<int> kk;     for (int i = 1; i <= n; i++) {       int num = 0;       if (M[i].first < k) {         int l = lower_bound(M + 1, M + 1 + n, make_pair(M[i].first, 0)) - M;         int r =             upper_bound(M + 1, M + 1 + n, make_pair(m - k + M[i].first, inf)) -             M - 1;         num = r - l + 1;         if (num == res) {           for (int i = 1; i < l; i++) kk.push_back(M[i].second);           for (int i = r + 1; i <= n; i++) kk.push_back(M[i].second);           break;         }       } else {         int l =             upper_bound(M + 1, M + 1 + n, make_pair(M[i].first - k, inf)) - M - 1;         num += l;         int r = lower_bound(M + 1, M + 1 + n, make_pair(M[i].first, 0)) - M;         num += n - r + 1;         if (num == res) {           for (int i = l + 1; i < r; i++) kk.push_back(M[i].second);           break;         }       }     }     cout << (n - res) <<     << t - 1 << endl;     sort(kk.begin(), kk.end());     for (int i = 0; i < kk.size(); i++) {       printf( %d  , kk[i]);     }     puts(  );     return 0;   }   