# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1040056 | Marco_Escandon | Art Collections (BOI22_art) | C++17 | 796 ms | 1788 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"
typedef int ll;
void solve(int n) {
vector<ll> sol(n,0);
for(int i=1; i<=n; i++)
{
vector<ll> temp,temp2;
temp.push_back(i);
for(int j=1; j<=n; j++)
{
if(i!=j) temp.push_back(j);
if(i!=j) temp2.push_back(j);
}
temp2.push_back(i);
ll a=publish(temp);
ll b=publish(temp2);
ll t1=((a+b)-(n-1))/2;
ll t2=a-t1;
sol[i-1]=t2;
}
vector<ll> sf;
for(int i=0; i<n; i++)
for(int j=0; j<n; j++)
if(sol[j]==i) sf.push_back(j+1);
answer(sf);
return;
}
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... |