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) {
// TODO implement this function
for(int i=1; i<=9; i++) {
int tot = 0;
for(int j=(1 << ((int) log2(N))); j>=1; j>>=1) {
tot++;
if(tot > i + 1) break;
int count = 0;
for(int k=1; k<=N; k+=(j<<1)) {
for(int l=k; l<k+j; l++) {
if((k<<1) + (j<<1) - 1 - l <= N) {
count++;
schedule(l, k + k+(j<<1)-1 - l);
}
}
}
if(!count) continue;
vector<int> uni = visit();
}
}
vector<int> identity;
for(int i=1; i<=N; i++) identity.push_back(i);
answer(identity);
}
# | 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... |