func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 1e5 + 5;   int n;   int b[MAXN];   set<pair<int, int>, greater<pair<int, int> > > s;   int ans[MAXN];   int main() {     scanf( %d , &n);     for (auto i = 0; i != n; i++) scanf( %d , &b[i]);     for (auto i = 0; i != n; i++) {       int j = (i + 1) % n;       int delta = abs(n - b[i] - b[j]);       s.insert(make_pair(delta, i));     }     int l = 0, r = n - 1;     while (!s.empty()) {       int pos = s.begin()->second;       s.erase(s.begin());       int j = (pos + 1) % n;       if (n - b[pos] > b[j]) {         ans[pos] = l++;       } else {         ans[pos] = r--;       }     }     for (auto i = 0; i != n; i++) printf( %d  , ans[i]);   }   