func_code_string: #include <bits/stdc++.h>   const int N = 2e5 + 5;   int n, i, j, x, sz[N], c[N], t, s;   int main() {     scanf( %d , &n);     for (i = 1; i < n; i <<= 1, t++)       ;     for (i = 1; i <= n; i++) {       scanf( %d , &x);       c[i] += x;       for (j = x + 1; j; j -= j & (-j)) c[i] -= sz[j];       for (j = x + 1; j <= n; j += j & (-j)) sz[j]++;     }     memset(sz, 0, sizeof(sz));     for (i = 1; i <= n; i++) {       scanf( %d , &x);       c[i] += x;       for (j = x + 1; j; j -= j & (-j)) c[i] -= sz[j];       for (j = x + 1; j <= n; j += j & (-j)) sz[j]++;     }     for (i = n; i >= 1; i--) {       c[i - 1] += c[i] / (n - i + 1);       c[i] %= n - i + 1;     }     for (i = 1; i <= n; i++) {       for (s = 0, j = t; j >= 0; j--)         if ((s + (1 << j)) <= n && sz[s + (1 << j)] <= c[i])           c[i] -= sz[s += 1 << j];       printf( %d  , s);       for (j = s + 1; j <= n; j += j & (-j)) sz[j]--;     }   }   