#include<bits/stdc++.h>
#define endl "\n"
#include "partition.h"
using namespace std;

vector<int> solve(vector<int> A){
    vector<pair<int,int> > a(A.size());
    for(int i=0;i<A.size();i++){
        a[i] = {A[i],i};
    }
    vector<int> ans(a.size());
    sort(a.begin(),a.end());
    for(int i=0;i<a.size()/2;i++){
        ans[i] = a[2*i].second;
        ans[a.size()/2+i] = a[2*i+1].second;
    }
    return ans;
}

/*int main(){
    int n;
    cin>>n;
    vector<int> a(n);
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    vector<int> ans = solve(a);
    for(int i=0;i<n;i++){
        cout<<ans[i];
    }
    return 0;
}*/
