#include "bits/stdc++.h"
#include "partition.h"
// #include "grader.cpp"
using namespace std;


#define N 3000005
#define ll long long

const int inf = INT_MAX;

ll d[N], n, ans, S = 0;
vector <int> c, a, b;
set <int> s = {};
map <int,int> vis, vip;

void FF(int x,ll sm,int cnt) {
    if(sm * 2 >= S) {
        int l = cnt;
        int r = n - cnt;
        a.clear();
        if(ans > abs(r - l)) {
            ans = abs(r - l);
            for(int i = 0; i < n; i++) {
                if(b[i]) a.push_back(i);
                c[i] = b[i];
            }
        }
        return;
    }
    if(x == n) return;
    b[x] = 1;
    FF(x + 1, sm + d[x], cnt + 1);
    b[x] = 0;
    FF(x + 1, sm, cnt);
}

vector<int> solve(vector<int> A) {
    
    b.resize(n);
    c.resize(n);
    n = (int)A.size();
    ans = n;

    FF(0, 0, 0);

    for(int i = 0; i < n; i++) {
        if(!c[i]) a.push_back(i);
    }
    return a;
}