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

std::vector<int> solve(std::vector<int> A) {
    std::vector<int> veci(A.size());

    std::sort(A.begin(), A.end());

    for (int i = 0; i<A.size(); i+=2) {
        veci.push_back(A[i]);
    }
    for (int i = 1; i<A.size(); i+=2) {
        veci.push_back(A[i]);
    }

    return veci;
}
