#include "partition.h"
#include <algorithm>
#include <vector>
#include <utility>
#include <map>

using namespace std;

std::vector<int> solve(std::vector<int> A) {

    int N = (int)A.size();

    vector<int> res;
    vector<int> B;

    bool cur = 1;
    for(int i=0;i<N/2;++i) {
        if (cur) {
            res.push_back(i);
            res.push_back(N-i-1);
        }
        else {
            B.push_back(i);
            B.push_back(N-i-1);
        }
        cur = !cur;
    }
    if (N % 2 == 1) res.push_back(N/2);
    for(int i=0;i<(int)B.size();++i) res.push_back(B[i]);
    

    


    return res;
}
