# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
906042 | RaulAndrei01 | Art Collections (BOI22_art) | C++17 | 1140 ms | 1724 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<iostream>
using namespace std;
void solve(int n) {
vector<int> ans(n);
for (int i = 1; i <= n; i++)
{
vector<int> use(n);
use[0] = i;
for (int j = 2; j <= n; j++)
{
if (j <= i) use[j-1] = j-1;
else use[j-1] = j;
}
int d1 = publish(use);
use[n-1] = i;
for (int j = 1; j < n; j++)
{
if (j < i) use[j-1] = j;
else use[j-1] = j+1;
}
int d2 = publish(use);
// cout << d1 << ' ' << d2 << '\n';
// cout << (d1-d2+n-1)/2 << '\n';
ans[(d1-d2+n-1)/2] = i;
}
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... |