# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
866908 | TahirAliyev | Art Collections (BOI22_art) | C++17 | 1165 ms | 1692 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 ll long long
#define pii pair<int, int>
#define all(v) v.begin(), v.end()
const int MAX = 4004;
void solve(int N){
vector<int> ans(N, 0);
vector<int> a;
for(int j = 1; j <= N; j++){
a.push_back(j);
}
int p = publish(a);
for(int i = 1; i < N; i++){
a.erase(a.begin());
a.push_back(i);
int tmp = publish(a);
int d = p - tmp;
p = tmp;
ans[(d + N + 1) / 2 - 1] = i;
}
for(int i = 0; i < N; i ++){
if(!ans[i]){
ans[i] = N;
}
}
answer(ans);
}
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... |