func_code_string: #include <bits/stdc++.h>   const long long MAX = 300000;   const double PI = 3.14159265358979323846;   long long T[MAX * 2];   long long ceil_log2(long long n) {     long long v = 1;     long long log = 0;     while (v < n) {       v <<= 1;       log++;     }     return log;   }   std::bitset<64> reverse(std::bitset<64> set, long long bit_count) {     for (long long i = 0; i < bit_count / 2; i++) {       bool tmp = set[i];       set[i] = set[bit_count - 1 - i];       set[bit_count - 1 - i] = tmp;     }     return set;   }   void fft(std::complex<double> *A, long long bit_count, bool inverse = false) {     static std::complex<double> W[MAX];     long long N = 1 << bit_count;     for (long long i = 0; i < N; i++) {       long long j = T[i];       if (i < j) std::swap(A[i], A[j]);     }     for (long long step = 1; step < N; step <<= 1) {       double angle = -PI / step;       if (inverse) angle = -angle;       std::complex<double> w(1, 0), wn(std::cos(angle), std::sin(angle));       for (long long i = 0; i < step; i++) {         W[i] = w;         w *= wn;       }       for (long long start_even = 0; start_even < N; start_even += step * 2) {         auto start_odd = start_even + step;         for (long long i = 0; i < step; i++) {           std::complex<double> U = A[start_even + i];           std::complex<double> V = W[i] * A[start_odd + i];           A[start_even + i] = U + V;           A[start_odd + i] = U - V;         }       }     }     if (inverse) {       for (long long i = 0; i < N; i++) A[i] /= N;     }   }   long long C[MAX];   long long zero_count = 0;   long long n, x;   long long C_len, bit_count, N;   void init() {     std::fill(C, C + n + 1, 0);     C[0] = 1;     C_len = n + 1;     bit_count = ceil_log2(C_len * 2);     N = 1 << bit_count;     for (long long i = 0; i < N; i++) {       T[i] = reverse(i, bit_count).to_ullong();     }   }   void input() {     std::cin >> n >> x;     init();     long long sum = 0;     for (long long i = 0; i < n; i++) {       long long v;       std::cin >> v;       sum += v < x;       C[sum]++;     }     for (long long i = 0; i <= sum; i++)       if (C[i] > 1) zero_count += C[i] * (C[i] - 1) / 2;   }   int main() {     input();     std::cout << zero_count <<    ;     static std::complex<double> A[MAX * 2], B[MAX * 2];     std::copy(C, C + C_len, A);     std::fill(A + C_len, A + N, 0);     std::fill(B, B + 2 * n - C_len, 0);     std::reverse_copy(C, C + C_len, B + 2 * n - C_len);     std::fill(B + 2 * n, B + N, 0);     fft(A, bit_count);     fft(B, bit_count);     for (long long i = 0; i < N; i++) A[i] *= B[i];     fft(A, bit_count, true);     for (long long k = 1; k <= n; k++)       std::cout << (long long)std::round(A[2 * n - k - 1].real()) <<    ;     std::cout << std::endl;     return 0;     for (long long i = 0; i < N; i++) std::cout << A[i] <<    ;     std::cout << std::endl;     for (long long i = 0; i < N; i++) std::cout << B[i] <<    ;     std::cout << std::endl;     return 0;   }   