#include "partition.h"
#include <bits/stdc++.h>

using namespace std;

std::vector<int> solve(std::vector<int> a) {
    int n = a.size();

    vector<pair<int, int>> b;
    for (int i = 0; i < n; i++)
        b.push_back({a[i], i});

    vector<int> res;

    for (int i = (n % 2 == 0 ? 1 : 0); i < n; i += 2)
        res.push_back(b[i].second);
    for (int i = (n % 2 == 0 ? 0 : 1); i < n; i += 2)
        res.push_back(b[i].second);
    
    return res;
}
