# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
900029 | KN200711 | Art Collections (BOI22_art) | C++17 | 1214 ms | 1928 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> fr(N), bc(N), arr(N);
for(int i=0;i<N;i++) fr[i] = bc[i] = arr[i] = -1;
for(int i=1;i<=N;i++) {
vector<int> V;
for(int k=0;k<N;k++) {
int c = (i + k)%N + 1;
V.push_back(c);
}
int P = publish(V);
fr[V[0] - 1] = P, bc[V.back() - 1] = P;
}
for(int i=0;i<N;i++) {
int D = fr[i] - bc[i];
arr[(D + N) / 2] = i + 1;
}
answer(arr);
}
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... |