Submission #1130836

#TimeUsernameProblemLanguageResultExecution timeMemory
1130836lopkusArt Collections (BOI22_art)C++20
100 / 100
1057 ms484 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...