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

using namespace std;

vector<int> solve(vector<int> A)
{
    vector<int> solution;
    int n = A.size();
    if(n%2==0)
    {
        for(int i=1; i<=n/2; i++)
        {
            solution.push_back(i-1);
            solution.push_back(n-i);
        }
    }
    else
    {
        for(int i=1; i<=n/2; i++)
        {
            solution.push_back(i-1);
            solution.push_back(n-i);
        }
        solution.push_back(n/2);
    }

    return solution;
}

