# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
588801 | shayanebrahimi | Art Collections (BOI22_art) | 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'
#define fast_io; ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const ll MOD=1e9+7;//998244353//1e9+9//1111211111;
//ll tavmd(ll a,ll b){if(b==0){return 1;}if(b%2==0){ll x=tavmd(a,b/2);return(x*x)%MOD;}else{return(a%MOD*tavmd(a,b-1)%MOD)%MOD;}}
const ll MAXN=2e6+10;
const ll INF=8e18;
const ll LOG=30;
void solve(ll n){
vector<ll>a(n),b(n),c;
for(int i=1;i<=n;i++)
c.push_back(i);
for(int i=0;i<n;i++){
b[i]=publish(c);
for(int j=1;j<n;j++){
swap(c[j],c[j-1]);
}
}
for(int i=0;i<n;i++){
a[(b[i]-b[(i+1)%n]+n)/2]=i+1;
}
answer(a);
}
/*int main(){
fast_io;
return 0;
}*/