# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1093035 | De3b0o | Art Collections (BOI22_art) | C++17 | 955 ms | 1844 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>
#include<random>
#define ll long long
#define F first
#define S second
#define in insert
#define pb push_back
#define ppb pop_back()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define mid ((l+r)/2)
#define lc (2*x)
#define rc (2*x+1)
using namespace std;
ll a[4009];
ll ans[4009];
void solve(int N)
{
ll n = N;
vector<int> v;
for(int i = 1 ; n>=i ; i++)
{
v.clear();
v.pb(i);
ll sum = 1;
for(int j = 1 ; n>j ; j++)
{
if(j==i)
sum++;
v.pb(sum);
sum++;
}
ll v1 = publish(v);
v.clear();
sum=1;
for(int j = 1 ; n>j ; j++)
{
if(j==i)
sum++;
v.pb(sum);
sum++;
}
v.pb(i);
ll v2 = publish(v);
ll r = (n+1+v1-v2)/2;
ans[r]=i;
}
v.clear();
for(int i = 1 ; n>=i ; i++)
v.pb(ans[i]);
answer(v);
}
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... |