#include<bits/stdc++.h>
#include "partition.h"
#define endl '\n'
#define X first
#define Y second
using namespace std;
vector<pair<int,int>> v;
std::vector<int> solve(std::vector<int> A)
{
    vector<int> ans;
    int br=-1,n=A.size();
    for(auto i:A)
    {
        br++;
        v.push_back({a[i],br});
    }
    sort(v.begin(),v.end());
    for(int i=0;i<n/2;i++)
    {
        ans.push_back(v[i].Y);
        ans.push_back(v[n-i-1].Y);
    }
    if(n%2==1)
    {
        ans.push_back(v[n/2].Y);
    }
    return ans;
}
