# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
750509 | vjudge1 | Art Collections (BOI22_art) | C++17 | 1605 ms | 708 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;
void solve(int N) {
vector<int>fers(N);
int n=N;
vector<int>res;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
fers[(i+j)%n]=j+1;
}
res.push_back(publish(fers));
}
vector<int>ret(n);
for(int j=1;j<n;j++){
int dif=res[j]-res[j-1];
ret[(n-dif-1)/2+dif]=n-j+1;
}
for(int i=0;i<n;i++){
if(ret[i]==0){
ret[i]=1;
break;
}
}
answer(ret);
}
Compilation message (stderr)
# | 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... |