# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
666986 | berr | Art Collections (BOI22_art) | C++17 | 1406 ms | 768 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>
using namespace std;
#include "art.h"
void solve(int n)
{
vector<int> ans(n);
for(int i=0; i<n; i++)
{
vector<int> a(n);
for(int i=0; i<n; i++) a[i]=i+1;
swap(a[n-1], a[i]);
int k=publish(a);
reverse(a.begin(), a.begin()+n-1);
int f=publish(a);
int p=k+f-((n-1)*(n-2))/2;
p/=2;
ans[p]=i+1;
}
reverse(ans.begin(), ans.end());
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... |