#include <bits/stdc++.h>
#include "partition.h"
using namespace std;
using ll = int;
vector<int> solve(vector<int> a)
{
    ll tsum, minraz, ms = a.size();
    vector<int> v = a;
    vector<int> ans;
    for(ll i = 0; i < k.size(); i++)
    {
        tsum += k[i];
    }
    minraz = tsum;
    for(ll i = 0; i < k.size(); i++)
    {
        vector<int> locans1;
        vector<int> locans2;
        ll sum1 = 0, sum2 = 0;
        for(ll j = k.size() - i - 1; j >= 0; j++)
        {
            if(sum1 <= sum2)
            {
                sum1 += v[j];
                locans1.push_back[j];
            }
            else
            {
                sum2 += v[j];
                locans2.push_back[j];
            }
        }
        if(sum1 => sum2 && (sum1 - sum2 < minraz || (sum1 - sum2 == minraz && max(locans1.size(), locans2.size()) - min(locans1.size(), locans2.size()) < ms)))
        {
            ms = max(locans1.size(), locans2.size()) - min(locans1.size(), locans2.size());
            ans = locans1;
            ans.insert(ans.end(), locans2)
        }
        else if(sum2 > sum1 && (sum2 - sum1 < minraz || (sum2 - sum1 == minraz && max(locans1.size(), locans2.size()) - min(locans1.size(), locans2.size()) < ms)))
        {
            ms = max(locans1.size(), locans2.size()) - min(locans1.size(), locans2.size());
            ans = locans2;
            ans.insert(ans.end(locans2))
        }
    }
    return ans;
}
