#include "partition.h"
#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 7;
vector<int> solve(vector<int> A) {
	vector<int>res;
	long long mn = INF;
	int cnt = 0;
	for(auto x : A){
		cnt += x;
	}
	if(cnt % 2 == 1){
		cnt += 1;
	}
	cnt /= 2;
	for(int mask = 0; mask < (1 << (int)A.size()); ++mask){
		vector<int>lol, lol2;
		for(int i = 0; i < (int)A.size(); ++i){
			if(mask & (1 << i)){
				lol.push_back(i);
			} else {
				lol2.push_back(i);
			}
		}
		for(auto x : lol2){
			lol.push_back(x);
		}
		int cn = 0;
		int cn2 = 0;
		for(int i = 0; i < (int)lol.size(); ++i){
			cn += 1;
			cn2 += A[lol[i]];
			if(cn2 >= cnt){
				break;
			}
		}
		int cnn = abs((int)A.size() - cn);
		cn = abs(cnn - cn);
		if(mn > cn){
			mn = cn;
			res = lol;
		}
		if(mn == 0){
			break;
		}
	}
	return res;
}
