#include "partition.h"
#include <bits/stdc++.h>
//using namespace std ;
std::vector<int> solve(std::vector<int> V)
{
    long long sum = 0 ;
    int ind = 0 ;
    std :: vector < std :: pair < int , int > > A ;
    for ( auto it : V )
    {
        sum += it ;
        A.push_back( {it,ind} ) ;
        ind ++ ;
    }
    sum /= 2 ;
    sort ( A.begin() + 1 , A.end() ) ;
    int n = A.size() ;
    std :: vector < int > ans ;
    for ( int i = 0 ; i < n ; i += 2 )
        ans.push_back( A[i].second ) ;
    for ( int i = 1 ; i < n ; i += 2 )
        ans.push_back( A[i].second ) ;
    return ans ;
}