# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
877859 | VMaksimoski008 | Art Collections (BOI22_art) | C++17 | 1226 ms | 1764 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"
using namespace std;
void solve(int N) {
vector<int> inv(N+1);
for(int i=1; i<=N; i++) {
vector<int> v;
for(int j=i; j<=N; j++) v.push_back(j);
for(int j=1; j<=i-1; j++) v.push_back(j);
inv[i-1] = publish(v);
}
vector<int> ans(N);
inv[N] = inv[0];
for(int i=0; i<N; i++)
ans[(inv[i] - inv[i+1] + N - 1) / 2] = i+1;
answer(ans);
}
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... |