#include "partition.h"
#include <bits/stdc++.h>
using namespace std;

vector<int> solve(vector<int> a)
{
    int st=0, dr=a.size()-1;
    vector<int> ans(a.size());
    if(a.size()%2==0)
    {
        for(int i=0; i<a.size(); i+=2)
        {
            ans[i]=dr;
            ans[i+1]=st;
            st++;
            dr--;
        }
    }
    else
    {
        ans[0]=dr;
        dr--;
        for(int i=1; i<a.size(); i+=2)
        {
            ans[i]=dr;
            ans[i+1]=st;
            st++;
            dr--;
        }
    }
    return ans;
}