#include <bits/stdc++.h>
using namespace std;
vector<int>solve (vector<int>A)
{
    int len=A.size();
    vector<pair<int,int>>v;
    int sum=0;
    int pref[len+1];
    pref[0]=A[0];
    for(int i=0;i<len;i++)
    {
        v.push_back({A[i],i});
        sum+=A[i];
        if(i!=0)pref[i]=pref[i-1]+A[i];
    }
    if(sum%2==0)sum/=2;
    else sum=sum/2+1;

    sort(v.rbegin(),v.rend());
    int a=len/2;
    int cursum=pref[a-1];

    vector<int>ans;
    for(int i=0;i<a;i++)
    {
        ans.push_back(v[i].second);
    }
    bool tr=1;
    for(int i=a;i<len;i++)
    {
        if(cursum<sum)
        {
            cursum+=A[i];
            ans.push_back(v[i].second);
        }
        if(cursum>=sum)
        {
            return ans;
        }
    }
}
