#include "partition.h"
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
vi solve(vi A) {
    vi I(A.size());
    iota(I.begin(),I.end(),0);
    sort(I.begin(),I.end(),[&](int i, int j){return A[i] < A[j];});
    vi B(A.size());
    for(int i = 0;i < A.size()/2;i++) B[i] = I[2*i];
    for(int i = 0;i < A.size()/2;i++) B[i+A.size()/2] = I[2*i+1];
    return B;
}
