# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
924224 | asdasdqwer | Art Collections (BOI22_art) | C++17 | 1336 ms | 64312 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;
map<vector<int>, int> quer;
int query(vector<int> &a) {
if (quer.find(a) != quer.end()) {
return quer[a];
}
int sol = publish(a);
quer[a] = sol;
return sol;
}
void solve(int n) {
vector<int> a(n);
for (int i=0;i<n;i++) {
a[i]=i+1;
}
vector<int> res(n);
for (int i=0;i<n;i++) {
int r1 = query(a);
int f=a[0];
a.erase(a.begin());
a.push_back(f);
int r2 = query(a);
res[(r1-r2+n)/2]=i+1;
}
answer(res);
}
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... |