func_code_string: #include <bits/stdc++.h>   const int N = 1e5 + 5;   struct ooo {     int v, id;   } p[N << 1];   bool operator<(const ooo& a, const ooo& b) { return a.v < b.v; }   int n, ans, id, h, m, k, x;   int main() {     scanf( %d%d%d%d , &n, &h, &m, &k);     m /= 2;     for (int i = 1; i <= n; i++)       scanf( %d%d , &x, &p[i].v), p[i].v %= m, p[i].id = i;     std::sort(p + 1, p + 1 + n);     for (int i = 1; i <= n; i++) p[i + n] = p[i], p[i + n].v += m;     ans = 1e9;     x = -1;     for (int i = 1, j = 1; i <= n * 2; i++) {       while (p[i].v - p[j].v >= k) j++;       if (i > n && i - j < ans) ans = i - j, x = p[i].v;     }     printf( %d %d n , ans, x % m);     for (int i = 1; i <= n * 2; i++)       if (x - k < p[i].v && p[i].v < x) printf( %d  , p[i].id);   }   