# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
964937 | Onur_Ilgaz | Art Collections (BOI22_art) | C++17 | 1364 ms | 1836 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> order(n), ans;
for(int i = 0; i < n; i++) {
vector <int> ask(n);
for(int j = 0; j < n; j++) {
ask[j] = (i + j) % n + 1;
}
int get = publish(ask);
ans.push_back(get);
}
int mx = (n - 1);
for(int i = 0; i < n; i++) {
int diff = ans[(i + 1) % n] - ans[i];
int smaller = (mx - diff) / 2;
order[smaller] = i + 1;
}
answer(order);
}
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... |