#include "partition.h"
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define ll long long
std::vector<int> solve(std::vector<int> a) {
    int n = a.size();
    vector<pair<int, int>> pos(n);
    for (int i = 0; i < n; ++i) {
        pos[i] = { a[i],i };
    }
    vector<int> answ;
    //sort(pos.begin(), pos.end());
    for (int i = 0; i < n / 2; ++i) {
        answ.push_back(i);
        if (i != n - 1 - i) {
            answ.push_back(n - 1 - i);
        }
    }
    if(n%2==1)
    answ.push_back(n / 2);
    return answ;
}