| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 716094 | Sandarach151 | Art Collections (BOI22_art) | C++17 | 1628 ms | 672 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<bits/stdc++.h>
#include<art.h>
using namespace std;
void solve(int n){
    vector<int> vect;
    for(int i=1; i<=n; i++){
        vect.push_back(i);
    }
    int temp = publish(vect);
    swap(vect[0], vect[1]);
    int temp2 = publish(vect);
    if(temp<temp2){
        swap(vect[0], vect[1]);
    }
    temp = min(temp, temp2);
    for(int i=2; i<n; i++){
        swap(vect[i], vect[0]);
        int temp2 = publish(vect);
        int cur = temp2-temp;
        int pos = (cur+1)/2;
        swap(vect[i], vect[0]);
        for(int j=i; j>pos; j--){
            swap(vect[j], vect[j-1]);
        }
        temp-=i-pos;
    }
    answer(vect);
}
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... | ||||
