func_code_string: #include <bits/stdc++.h>   using namespace std;   template <class T>   inline void umax(T &x, T y) {     if (y > x) x = y;   }   template <class T>   inline void umin(T &x, T y) {     if (y < x) x = y;   }   const int N = 2e5 + 5, B = 0x7fffffff;   map<int, int> comp;   set<int> s;   vector<int> ans;   int a[N];   int st[4 * N];   int n;   int nn;   void upd(int l, int r, int id, int u, int v) {     if (l == r) {       umax(st[id], v);       return;     }     int mid = (l + r) >> 1;     if (u <= mid)       upd(l, mid, id << 1, u, v);     else       upd(mid + 1, r, id << 1 | 1, u, v);     st[id] = max(st[id << 1], st[id << 1 | 1]);   }   int get(int l, int r, int id, int ql, int qr) {     if (r < ql || l > qr) return 0;     if (l >= ql && r <= qr) return st[id];     int mid = (l + r) >> 1;     return max(get(l, mid, id << 1, ql, qr),                get(mid + 1, r, id << 1 | 1, ql, qr));   }   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; i++)       scanf( %d , &a[i]), s.insert(a[i]), s.insert(a[i] - 1);     for (int x : s) comp[x] = ++nn;     for (int i = n; i >= 1; i--) {       int ppq = (get(1, nn, 1, 1, comp[a[i] - 1]));       ans.push_back(ppq == 0 ? -1 : ppq - i - 1);       upd(1, nn, 1, comp[a[i]], i);     }     for (int i = (int)ans.size() - 1; i >= 0; i--) printf( %d  , ans[i]);     return !1;   }   