#include "partition.h"
#include <bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define ll long long
using namespace std;
const ll N=2e6;
std::vector<int> solve(std::vector<int> A) {
    vector <int> ans;
	ans.clear();
    pair <int,int> p[N+5];
    ll n=A.size();
    for (int i=0; i<A.size(); i++){
    	p[i]=make_pair(A[i],i);
	}
	sort(p,p+n);
	
	for (int i=0; i<(n-1)/2; i++) ans.pb(p[i].s);
	ans.pb(p[n].s);
	for (int i=(n-1)/2; i<n-1; i++) ans.pb(p[i].s); 
}
