# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
574698 | AmirElarbi | Art Collections (BOI22_art) | C++17 | 1916 ms | 712 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 vi vector<int>
#define ve vector
#define ll long long
#define vf vector<float>
#define vll vector<pair<ll,ll>>
#define ii pair<int,int>
#define vvi vector<vi>
#define vii vector<ii>
#define gii greater<ii>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define INF 1e9
#define eps 1e-7
#define eps1 1e-2
#define optimise ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define MAX_A 2e5+5
using namespace std;
const int MOD = 1e4+7;
const int nax = 5e3+7;
#include "art.h"
typedef complex<int> Point;
#define X real()
#define Y imag()
void solve(int N) {
int n = N;
int ans[N], lst = -1;
vi order;
for (int j = 1; j <= n; ++j)
{
order.pb(j);
}
lst = publish(order);
int fi = lst;
for (int i = 1; i < n; ++i)
{
order.clear();
for (int j = i; j < n+i; ++j)
{
order.pb(j%n + 1);
}
int cur = publish(order);
int diff = lst-cur+n-1;
ans[diff/2] = i;
lst = cur;
}
int diff = lst-fi+n-1;
ans[diff/2] = n;
vi res;
for (int i = 0; i < n; ++i)
{
res.pb(ans[i]);
}
answer(res);
}
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... |