func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 5e4 + 10;   int b[MAXN], n, a[MAXN];   int ID(int x) {     x = x % n;     if (x < 0) x += n;     return x;   }   int main(void) {     scanf( %d , &n);     for (int i = 0; i < n; ++i) scanf( %d , a + i);     vector<pair<int, int> > foo;     for (int i = 0; i < n; ++i) foo.push_back(make_pair(a[i] + a[ID(i + 1)], i));     sort(foo.begin(), foo.end());     for (int i = 0; i < n; ++i) b[foo[i].second] = i;     printf( %d , b[0]);     for (int i = 1; i < n; ++i) printf(  %d , b[i]);     printf(  n );     return 0;   }   