# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
939474 | Hanksburger | Art Collections (BOI22_art) | C++17 | 1188 ms | 1604 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;
void solve(int n) {
vector<int> vec, tmp;
for (int i=1; i<=n; i++)
tmp.push_back(i);
int cur=publish(tmp);
vec.push_back(1);
for (int i=2; i<=n; i++)
{
tmp.clear();
tmp.push_back(i);
for (int j:vec)
tmp.push_back(j);
for (int j=i+1; j<=n; j++)
tmp.push_back(j);
int ind=(publish(tmp)+i-1-cur)/2;
vec.insert(vec.begin()+ind, i);
cur-=i-1-ind;
}
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... |