#include<bits/stdc++.h>
using namespace std;
#include "art.h"
void solve(int n){
vector<int> ans(n);
vector<int> p(n);
for(int i=0; i<n; i++)p[i]=i+1;
int qry[n];
for(int i=0; i< n; i++){
qry[i]=publish(p);
rotate(p.begin(), p.begin()+1, p.end());
}
for(int i=0; i< n; i++){
int x=qry[i];
int y=qry[(i+1)%n];
ans[(x-y+n-1)/2]=i+1;
}
answer(ans);
}
# | 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... |