#include "partition.h"
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

vector<int> vecglob;

bool comp(int a, int b)
{
    return vecglob[a] < vecglob[b];
}

vector<int> solve(std::vector<int> vec)
{
    vector<int> res;
    ll amount = (ll)vec.size();
    vector<pair<int, int>> vec2;
    for(ll i = 0; i < amount; i++)
    {
        vec2.push_back({vec[i], i});
    }
    sort(vec2.begin(), vec2.end());
    for(ll i = 0; i < amount/2-1; i++)
    {
        res.push_back(vec2[i].second);
    }
    res.push_back(vec2.back().second);
    for(ll i = amount/2; i < amount-1; i++)
    {
        res.push_back(vec2[i].second);
    }
    return res;
}
