#include "partition.h"
#include <bits/stdc++.h>
using namespace std;
vector<int>rez;
vector<pair<pair<int,int>,int>>v;
std::vector<int> solve(std::vector<int> A)
{
    int n=A.size();
    v.clear();
    for(int i=0;i<n;i++)
        v.push_back({{A[i],i},0});
    sort(v.begin(),v.end());
    for(int i=0;i<n;i+=2)
    {
        rez.push_back(v[i].first.second);
        v[i].second=1;
    }
    for(int i=0;i<n;i++)
    {
        if(v[i].second==0)
            rez.push_back(v[i].first.second);
    }
    return rez;
}
