# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
720908 | YENGOYAN | Art Collections (BOI22_art) | C++17 | 0 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 "art.h"
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
void solve(int N) {
// std::vector<int> order = {1, 2, 3};
// publish(order);
// order = {2, 3, 1};
// publish(order);
// order = {1, 3, 2};
// answer(order);
int n = N;
vector<int> v(n);
for(int i = 0; i < n; ++i){
v[i] = i + 1;
}
int l1 = publish(v), c = n;
vector<int> ans(n);
for(int i = 0; i < n - 1; ++i){
v.insert(v.begin(), v.back());
v.pop_back();
int l2 = publish(v);
ans[(l2 - l1 + n - 1) / 2] = --c;
l1 = l2;
}
for(int i = 0; i < n; ++i){
if(!ans[i]) {
ans[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... |