# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
587822 | 1zaid1 | Art Collections (BOI22_art) | C++17 | 111 ms | 296 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;
void solve(int n) {
vector<int> v(n, 0);
for (int i = 0; i < n; i++) v[i] = i+1;
int sum = publish(v);
while (sum) {
for (int i = 0; i < n-1; i++) {
swap(v[i], v[i+1]);
int x = publish(v);
if (x > sum) swap(v[i], v[i+1]);
else sum = x;
}
} 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... |