func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long N = 2e5 + 7, inf = 1e9;   long long n, m, cnt, ans;   long long a[N], b[N], c[N], tr[N];   long long lowbit(long long x) { return x & -x; }   long long query(long long x) {     long long sum = 0;     for (; x; x -= lowbit(x)) sum += tr[x];     return sum;   }   void add(long long x) {     for (; x <= cnt; x += lowbit(x)) tr[x]++;   }   long long check(long long x) {     long long sum = 0;     add(lower_bound(b + 1, b + cnt + 1, 0) - b);     for (long long i = 1; i <= n; i++) {       if (a[i] - x < b[1])         sum += i;       else if (a[i] - x > b[cnt])         ;       else {         long long pos = lower_bound(b + 1, b + cnt + 1, a[i] - x) - b;         if (b[pos] > a[i] - x) pos--;         sum += i - query(pos);       }       add(c[i]);     }     return sum;   }   signed main() {     scanf( %lld%lld , &n, &m);     for (long long i = 1; i <= n; i++) scanf( %lld , &a[i]);     for (long long i = 1; i <= n; i++) a[i] = a[i - 1] + a[i], b[i] = a[i];     b[n + 1] = 0;     sort(b + 1, b + n + 2);     cnt = unique(b + 1, b + n + 2) - b - 1;     for (long long i = 1; i <= n; i++)       c[i] = lower_bound(b + 1, b + cnt + 1, a[i]) - b;     printf( %lld n , check(m));   }   