#include "partition.h"
#define _GLIBCXX_FILESYSTEM
#include<bits/stdc++.h>
using namespace std;
vector<int> solve(vector<int> a) {
    vector<pair<int, int>> aiidx;
    long long s = 0, s1 = 0, s2 = 0;
    for (int i = 0; i < a.size(); i++) {
        aiidx.push_back({a[i], i});
    }
    sort(aiidx.begin(), aiidx.end());
    vector<int> d;
    for (int i = 0; i < aiidx.size(); i+=2) d.push_back(aiidx[i].second);
    for (int i = 1; i < aiidx.size(); i+=2) d.push_back(aiidx[i].second);
    return d;
}
