func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, p1, p2, tot1, tot2;   long long L, W, ans, a[100005], b[100005];   int main() {     scanf( %d%lld%lld , &n, &L, &W);     long long t;     int v;     for (int i = 1; i <= n; ++i) {       scanf( %lld%d , &t, &v);       if (v == 1)         a[++tot1] = t;       else         b[++tot2] = t;     }     sort(a + 1, a + tot1 + 1), sort(b + 1, b + tot2 + 1);     for (p1 = p2 = 1; p1 <= tot1; ++p1) {       while (p2 <= tot2 && (b[p2] - a[p1] + L) * W <= abs(b[p2] + a[p1] + L) &&              (p2++, 1))         ;       ans += tot2 - p2 + 1;     }     printf( %lld n , ans);     return 0;   }   