# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
581021 | KoD | Art Collections (BOI22_art) | C++17 | 1554 ms | 728 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 ll = long long;
using std::vector;
using std::array;
using std::tuple;
using std::pair;
template <class F> struct fixed : private F {
explicit fixed(F&& f) : F(std::forward<F>(f)) {}
template <class... Args> decltype(auto) operator()(Args&&... args) const {
return F::operator()(*this, std::forward<Args>(args)...);
}
};
template <class T>
constexpr T infty = std::numeric_limits<T>::max() / 2;
void solve(int N) {
vector<int> ret(N);
for (int x = 1; x <= N; ++x) {
vector<int> P(N);
std::iota(P.begin(), P.end(), 1);
std::swap(P[0], P[x - 1]);
const int a = publish(P);
std::rotate(P.begin(), P.begin() + 1, P.end());
const int b = publish(P);
const int h = ((N - 1) - (b - a)) / 2;
ret[h] = x;
}
answer(ret);
}
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... |