#include<bits/stdc++.h>
#include"partition.h"
using namespace std;
//#define int long long
void output(vector<int> a){
    for(auto x:a) cout<<x<<' ';
    cout<<'\n';
}
vector<int> solve(vector<long long> A){
    long long N=A.size(),ans=A.size(),S=0;
    vector<int> best;
    for(auto x:A) S+=x;
    for(long long i=0;i<(1LL<<N);i++){
        vector<int> X,Y;
        int xs,ys;
        for(int j=0;j<N;j++){
            if(i&(1LL<<j)) X.push_back(j);
            else Y.push_back(j);
        }
        xs=X.size();
        ys=Y.size();
        //output(X);
        //output(Y);
        long long s=0;
        for(int j=0;j<xs;j++) s+=A[X[j]];
        if(s>=S/2LL&&abs(xs-ys)<ans){
            best.clear();
            for(auto z:X) best.push_back(z);
            for(auto z:Y) best.push_back(z);
            ans=abs(xs-ys);
        }
    }
    return best;
}