#include "partition.h"
#include "bits/stdc++.h"
using namespace std;
#define ls(v) (int)v.size()
#define rall(v) v.rbegin(), v.rend()
#define all(v) v.begin(), v.end()
#define pb push_back
#define ff first
#define ss second
vector<int> solve(vector<int> a) {
    vector<pair<int, int>> v;
    int n = ls(a);
    for(int i = 0;i<n;++i) v.pb({a[i], i});
    sort(all(v));
    vector<int> ans;
    int mid = n - 1 >> 1;
    for(int i = 0;i<mid; ++i) ans.pb(v[i].ss);
    ans.pb(v.back().ss);
    for(int i = mid;i<n - 1;++i) ans.pb(v[i].ss);
    return ans;
}
