# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
602467 | MrDeboo | Art Collections (BOI22_art) | C++17 | 1980 ms | 696 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;
int n;
vector<int>vc(4001,-1);
int sbmt(vector<int>vct){
int tot=0,a=0;
vector<int>v;
for(int i=1;i<=n;i++){
if(vc[i]==-1)a++;
else {tot+=a;v.push_back(vc[i]);}
}
for(auto &i:vct)v.push_back(i);
return publish(v)-tot;
}
void solve(int N){
n=N;
vector<int>v;
for(int i=1;i<=n;i++)v.push_back(i);
int a=sbmt(v);
while(v.size()>1){
int x=v.back();
vector<int>vcc={x};
for(int i=0;i<v.size()-1;i++)vcc.push_back(v[i]);
int b=sbmt(vcc);
int y=b-a;
vector<int>voc;
for(int i=1;i<=n;i++){
if(vc[i]==-1)voc.push_back(i);
}
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... |