# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
703626 | Kipras | Art Collections (BOI22_art) | C++17 | 1 ms | 208 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>
#include "art.h"
typedef long long ll;
using namespace std;
void solve(int n){
vector<ll> actual;
vector<ll> offsets;
//get all the offsets
for(int i = 0; i < n; i++){
vector<int> temp;
for(int x = 0; x < n; x++){
temp.push_back((i+x)%n);
}
offsets.push_back(publish(temp));
}
for(int i = 0; i < n; i++){
ll y = (offsets[i]+offsets[(i+1)%n]-2*n+2)/2;
ll number = n-(offsets[i]-y);
actual.push_back(number);
}
reverse(actual.begin(), actual.end());
vector<int> result;
for(auto i : actual){
result.push_back(i);
}
answer(result);
}
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... |