#include <bits/stdc++.h>
#include "art.h"
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define pb push_back
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define MOD 1000000007
void solve(int n){
vector<int> v(n);
iota(v.begin(), v.end(), 1);
int prev=publish(v);
vector<int> atb(n,0);
for(int i=1; i<n; i++){
v.push_back(v[0]);
v.erase(v.begin());
int cur=publish(v);
int d=prev-cur;
if(n&1){
atb[n/2+(d/2)]=v[n-1];
}else{
atb[n/2+((d-1)/2)]=v[n-1];
}
prev=cur;
}
for(int i=0; i<n; i++){
if(atb[i]==0) atb[i]=v[0];
}
answer(atb);
}
# | 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... |