#include "partition.h"
#include <map>
using namespace std;

std::vector<int> solve(std::vector<int> A) {
    if (A.size() == 1) return { 0 };

    vector<int> res(A.size());
    int k = 0;

    for (int i = 0; i < A.size(); i += 2) {
        res[k++] = i;
    }

    for (int i = 1; i < A.size(); i += 2) {
        res[k++] = i;
    }

    return res;
}
