# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
610709 | four_specks | Art Collections (BOI22_art) | C++17 | 1553 ms | 688 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;
namespace
{
}
void solve(int N)
{
vector<int> c(N);
vector<int> v(N);
iota(v.begin(), v.end(), 1);
for (int i = 0; i < N; i++)
{
c[i] = publish(v);
for (int i = 0; i < N - 1; i++)
swap(v[i], v[i + 1]);
}
vector<int> r(N);
for (int i = 0; i < N; i++)
{
int x = c[i] - c[(i + 1) % N];
assert((N + x) % 2 == 1);
r[(N + x - 1) / 2] = i + 1;
}
answer(r);
}
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... |