#include "partition.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
vector<int> solve(vector<int> A) {
    ll n=A.size();
    ll sum=0;
    for(ll i:A) sum+=i;
    ll thr = (sum+1)/2;
    ll ans=sum+1;
    vector<int>anss;
    for(ll i=0;i<(1<<n);i++){
        ll sm=0;
        for(ll j=0;j<n;j++){
            if(i&(1<<j)){
                sm+=A[j];
            }
        }
        if(sm>=thr){
            if(ans>sm){
                ans=sm;
                anss.clear();
                // cout<<i<<' '<<sm<<' '<<thr<<endl;
                for(ll j=0;j<n;j++){
                    if(i&(1<<j)){
                        anss.push_back(j);
                    }
                }
                for(ll j=0;j<n;j++){
                    if(!(i&(1<<j))){
                        anss.push_back(j);
                    }
                }
            }
        }
    }
    return anss;
}