#include <bits/stdc++.h>
#include "partition.h"
using namespace std;
vector<int> solve(std::vector<int> A){
    int N=(int)A.size();
    vector<int> resD, resM;
    map<int, int> mp;
    for(int i=0;i<N/2;i++){
        if(i<N/4){
            resM.push_back(i);
            resM.push_back(N-i-1);
        }
        else{
            resD.push_back(i);
            resD.push_back(N-i-1);
        }
    }
    if(N%2==1)
        resD.push_back(N/2);
    for(auto it:resM)
        resD.push_back(it);
    return resD;
}
