func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, w;   long long ans;   double a[100010], b[100010];   struct node {     int f, x, v;     double a, b;   } sh[100010];   double m_abs(double x) {     if (x < 0)       return -x;     else       return x;   }   bool cmp(node x, node y) { return (x.a < y.a || (x.a == y.a && x.b > y.b)); }   void m_sort(int l, int r) {     if (l == r) return;     int mid;     mid = (l + r) / 2;     m_sort(l, mid);     m_sort(mid + 1, r);     int ll, rr, now;     now = 0;     ll = l;     rr = mid + 1;     while (ll <= mid && rr <= r) {       if (a[ll] < a[rr]) {         now++;         b[now] = a[ll];         ll++;       } else {         now++;         b[now] = a[rr];         rr++;         ans += (long long)mid - ll + 1;       }     }     for (int i = ll; i <= mid; i++) {       now++;       b[now] = a[i];     }     for (int i = rr; i <= r; i++) {       now++;       b[now] = a[i];     }     for (int i = 1; i <= now; i++) {       a[l + i - 1] = b[i];     }   }   int main() {     scanf( %d%d , &n, &w);     for (int i = 1; i <= n; i++) {       scanf( %d%d , &sh[i].x, &sh[i].v);       if (sh[i].x > 0) sh[i].f = 1;     }     for (int i = 1; i <= n; i++) {       if (sh[i].f == 0) {         sh[i].a = m_abs((sh[i].x * 1.0) / ((sh[i].v + w) * 1.0));         sh[i].b = m_abs((sh[i].x * 1.0) / ((sh[i].v - w) * 1.0));       } else {         sh[i].b = m_abs((sh[i].x * 1.0) / ((sh[i].v - w) * 1.0));         sh[i].a = m_abs((sh[i].x * 1.0) / ((sh[i].v + w) * 1.0));       }     }     sort(sh + 1, sh + 1 + n, cmp);     for (int i = 1; i <= n; i++) a[i] = sh[i].b;     m_sort(1, n);     printf( %lld n , ans);   }   