#include "partition.h"
#include <bits/stdc++.h>
#define MAXVAL 30000000
#define MAXN 2000000

using namespace std;

struct elem{
    int val, poz;
} v[MAXN + 1];

int cmp(elem A, elem B){
    return A.val < B.val;
}

vector<int> solve(vector<int> A){
    int N, i;
    vector <int> rez;

    N = A.size();
    for(i = 0; i < N; i++){
        v[i].val = A[i];
        v[i].poz = i;
    }
    sort(v, v + N, cmp);
    for(i = N - 1; i >= 0; i--){
        rez.push_back(v[i].poz);
    }
    return rez;
}
//5
//4
//1 2 4 8
//5
//1 2 4 8 16
