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 "swaps.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int N, int V) {
srand(time(NULL));
vector<int> x(N);
for(int i = 0; i < N; i++) x[i] = i + 1;
vector<int> shuff(N);
for(int i = 0; i < N; i++) {
shuff[i] = i+1;
}
for(int i = 0; i < N; i++) {
for(int j = i%2; j < N - 1; j += 2) {
schedule(x[j], x[j+1]);
}
vector<int> v = visit();
for(int j = i%2; j < N - 1; j += 2) {
if(v[j/2] == 0) swap(x[j], x[j+1]);
}
}
answer(x);
}
# | 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... |