#include "partition.h"
#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
vi solve(vi A) {
    vi I;
    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] = 2*I[i];
    for(int i = 0;i < A.size()/2;i++) B[i+A.size()/2] = 2*I[i]+1;
    return B;
}
