| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1188874 | herissonwoww | Art Collections (BOI22_art) | C++20 | 13 ms | 412 KiB |
#include "art.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int n) {
vector <int> vals(n);
for(int i = 0; i < n; i++){
vals[i] = i+1;
}
if(n <= 6){
do {
int k = publish(vals);
if(k==0){
answer(vals);
return;
}
} while (next_permutation(vals.begin(), vals.end()));
assert(0);
}
if(n<=40){
for(int i = 0; i < n-1; i++){
for(int j = 0; j < n-1; j++){
int kfirst = publish(vals);
swap(vals[j],vals[j+1]);
int ksecond = publish(vals);
if(kfirst < ksecond){
swap(vals[j],vals[j+1]);
}
}
}
answer(vals);
}
}
| # | 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... | ||||
