# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
750339 | parsadox2 | Art Collections (BOI22_art) | C++17 | 1604 ms | 808 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>
#define pb push_back
#define F first
#define S second
#define debug(x) cout << #x << "= " << x << ", "
#define ll long long
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define SZ(x) (int) x.size()
#define wall cout << endl;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#include "art.h"
const int maxn = 4e3 + 10;
int ans[maxn] , b[maxn];
void solve(int n)
{
for(int i = 1 ; i <= n ; i++)
{
vector <int> vec;
for(int j = i ; j <= n ; j++) vec.pb(j);
for(int j = 1 ; j < i ; j++) vec.pb(j);
ans[i] = publish(vec);
}
vector <int> vec(n);
for(int i = 1 ; i <= n ; i++)
{
int nex = (i == n ? 1 : i + 1);
int tmp = ans[i] + ans[nex] - (n - 1);
tmp /= 2;
b[i] = ans[i] - tmp;
vec[b[i]] = i;
}
answer(vec);
}
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... |