# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1046499 | vjudge1 | Event Hopping (BOI22_events) | C++17 | 0 ms | 0 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;
#define ar array
#define int long long
#define ld long double
signed main(){ios::sync_with_stdio(false);cin.tie(0);
vector<int> v;
for(int i = 1;i<=n;i++)v.pb(i);
int ans[n+1];
for(int i = 0;i<n;i++){
ans[i] = publish(v);
v.pb(v[0]);
v.erase(v.begin());
}
ans[n] = ans[0];
for(int i = 0;i<n;i++){
int x = ans[i] - (ans[i] + ans[i+1] - n + 1) / 2;
v[x] = i + 1;
}
answer(v);
}