#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});

    sort(b.begin(), b.end());
    vector<int> res;

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