| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 854380 | esomer | Art Collections (BOI22_art) | C++17 | 1173 ms | 1784 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "art.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int N) {
    vector<int> order(N);
    for(int i = 0; i < N; i++) order[i] = i + 1;
    int lst = publish(order);
    int fst = lst;
    vector<int> ans(N);
    for(int i = 0; i < N; i++){
        reverse(order.begin(), order.end());
        int elem = order.back(); order.pop_back();
        reverse(order.begin(), order.end());
        order.push_back(elem);
        int nw;
        if(order[0] == 1) nw = fst;
        else nw = publish(order);
        int dif = nw - lst;
        lst = nw;
        ans[order[N - 1] - 1] = (N - dif + 1) / 2;
        // cout << "rank " << ans[order[0] - 1] << " nw " << nw << " lst " << lst2 << endl;
    }
    vector<int> real_ans(N);
    for(int i = 0; i < N; i++){
        real_ans[ans[i]-1] = i + 1;
    }
    answer(real_ans);
}
/*
10
9 10 3 1 2 4 8 7 6 5
*/
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
