#include "partition.h"
#include<bits/stdc++.h>
using namespace std;
vector<int> solve(vector<int> A) {
    vector<int> otg1, otg2;
    int s1 = 0, s2 = 0;
    for(int i = 0; i < A.size(); i++)
    {
        if(s1 <= s2)
        {
            s1 += A[i];
            otg1.push_back(i);
        }
        else
        {
            s2 += A[i];
            otg2.push_back(i);
        }
    }
    vector<int> otg;
    for(int i = 0; i < otg1.size(); i++)
    {
        otg.push_back(otg1[i]);
    }
    for(int i = 0; i < otg2.size(); i++)
    {
        otg.push_back(otg2[i]);
    }
    return otg;
}
