#include "partition.h"
#include <algorithm>
#include <iostream>
std::vector<int> solve(std::vector<int> A) {
    int s=0;
    std::vector<std::pair<int,int>>v;
    int n=0;
    for(int i=0;i<A.size();i++){
        int e=A[i];
        v.push_back({e,n});
        n++;
        s+=e;
    }
    std::sort(v.begin(),v.end(),[](std::pair<int,int> a,std::pair<int,int> b){
        return a.first<b.first;
    });
    std::vector<int>ans;
    n--;
    ans.push_back(v[n].second);
    for(int i=0;i<n;i++){
        if(i!=v[n].second) ans.push_back(i);
    }
    return ans;
}
