#include "bits/stdc++.h"
#include "partition.h"
// #include "grader.cpp"

using namespace std;

#define SZ(s) (int)s.size()
#define ll long long
#define ff first
#define ss second

vector<int> solve(vector<int> a) {
    int n = SZ(a);
    ll s = 0;
    vector <pair <int, int>> v;
    deque <int> p;
    for(int i = 0; i < (n - 1) / 2; i++) {
        s += a[i];
        p.push_front(i);
        v.push_back({a[i], i});
    }
    for(int i = n-1; i >= (n - 1) / 2; i--) {
        p.push_back(i);
    }
    sort(v.begin(), v.end());
    return {p.begin(), p.end()};
}
