#include<bits/stdc++.h>
#include "partition.h"
#define endl '\n'
using namespace std;
void speed()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
int t,n,a[2000005];
vector<int>otg1,otg2;
vector<int> solve(vector<int> A)
{
    otg1.clear();
    otg2.clear();
    n=A.size();
    long long int sum=0;
    for(int i=1; i<=n; i++)
    {
        a[i]=A[i-1];
        sum+=a[i];
    }
    sort(a+1,a+n+1);
    long long int st1=0,st2=0;
    for(int i=n; i>=0; i--)
    {
        if(st1<=st2)
        {
            st1+=a[i];
            otg1.push_back(i);
        }
        else
        {
            st2+=a[i];
            otg2.push_back(i);
        }
        //cout<<st1<<" "<<st2<<endl;
    }
    for(int i=0;i<otg2.size();i++)
    {
        otg1.push_back(otg2[i]);
    }
    return otg1;
}
