# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
714276 | vjudge1 | Art Collections (BOI22_art) | C++17 | 106 ms | 208 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>
#define pb push_back
using namespace std;
typedef long long ll;
void solve(int N){
ll b[N+1];
for(int i=1;i<=N;i++){
b[i]=0;
}
vector<int> a;
for(int i=1;i<=N;i++){
for(int j=i+1;j<=N;j++){
a.pb(i);
a.pb(j);
for(int z=1;z<=N;z++){
if(z!=i && z!=j){
a.pb(z);
}
}
ll res1=publish(a);
swap(a[0],a[1]);
ll res2=publish(a);
if(res1<res2){
b[a[0]]++;
}
else{
b[a[1]]++;
}
a.clear();
}
}
a.resize(N);
for(int i=1;i<=N;i++){
a[b[i]]=i;
}
answer(a);
}
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... |