# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1119421 | thelegendary08 | Art Collections (BOI22_art) | C++17 | 1340 ms | 1916 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>
#define vi vector<int>
#define pb push_back
#define f0r(i,n) for(int i = 0; i < n; i++)
using namespace std;
void solve(int N) {
std::vector<int> order = {1, 2, 3};
vi v;
f0r(i, N){
vi quer;
for(int j = i; j < N; j++){
quer.pb(j+1);
}
f0r(j, i){
quer.pb(j+1);
}
int x = publish(quer);
v.pb(x);
}
v.pb(v[0]);
vi ord(N);
f0r(i, N){
ord[i] = (N-1 - (v[i+1] - v[i]))/2;
}
/*
f0r(i, N){
cout<<ord[i]<<' ';
}
cout<<'\n';
*/
vi ans(N);
f0r(i,N){
ans[ord[i]] = i+1;
}
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... |