# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
877722 | vjudge1 | Art Collections (BOI22_art) | C++17 | 1191 ms | 1756 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;
//#define int long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using ll = long long;
using ld = long double;
const int mxn = 4005;
void solve(int n) {
vector<int> v;
for(int i = 1;i<=n;i++)v.pb(i);
int ans[n+1];
for(int i = 0;i<n;i++){
ans[i] = publish(v);
v.pb(v[0]);
v.erase(v.begin());
}
ans[n] = ans[0];
for(int i = 0;i<n;i++){
int x = ans[i] - (ans[i] + ans[i+1] - n + 1) / 2;
v[x] = i + 1;
}
answer(v);
}
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... |