# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1046499 | 2024-08-06T15:53:55 Z | vjudge1 | Event Hopping (BOI22_events) | C++17 | 0 ms | 0 KB |
#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); }