func_code_string: #include <bits/stdc++.h>   using namespace std;   void solve() {     long long int n, i;     cin >> n;     vector<long long int> a(n), mini(n);     for (i = 0; i < (n); i++) cin >> a[i];     mini[n - 1] = a[n - 1];     for (i = n - 2; i >= 0; i--) {       mini[i] = min(mini[i + 1], a[i]);     }     for (i = 0; i < n; i++) {       long long int l = i, r = n - 1;       long long int ans = -1;       while (l <= r) {         long long int m = l + (r - l) / 2;         if (mini[m] < a[i]) {           l = m + 1;           ans = m;         } else           r = m - 1;       }       if (ans == -1)         cout << -1 <<    ;       else         cout << ans - i - 1 <<    ;     }     cout <<   n ;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     solve();     return 0;   }   