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>
#include "swaps.h"
using namespace std;
void solve (int n, int v) {
vector <int> arr;
for (int i = 1; i <= n; i++) {
arr.push_back(i);
}
for (int i = 0; i < n; i++) {
for (int j = (i & 1); j + 1 < n; j += 2) {
schedule(arr[j], arr[j + 1]);
}
auto x = visit();
int cnt = -1;
for (int j = (i & 1); j + 1 < n; j += 2) {
cnt++;
if (!x[cnt]) {
swap(arr[j + 1], arr[j]);
}
}
}
answer(arr);
}
# | 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... |
# | 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... |