#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<=7; i++) {
for(int j=(1 << ((int) log2(N))); j>=1; j>>=1) {
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) schedule(l, k + k+(j<<1)-1 - l);
}
}
vector<int> uni = visit();
}
for(int j=2; j+1<=N; j+=2) {
schedule(j, j+1);
}
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 |
1 |
Incorrect |
1 ms |
208 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
208 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
2 ms |
208 KB |
Correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
2 ms |
208 KB |
Correct |
3 |
Incorrect |
1 ms |
208 KB |
Not correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
2 ms |
208 KB |
Correct |
3 |
Correct |
3 ms |
208 KB |
Correct |
4 |
Incorrect |
6 ms |
300 KB |
Not correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
2 ms |
208 KB |
Correct |
3 |
Correct |
3 ms |
208 KB |
Correct |
4 |
Incorrect |
6 ms |
300 KB |
Not correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
1 ms |
208 KB |
Correct |
3 |
Correct |
5 ms |
208 KB |
Correct |
4 |
Incorrect |
6 ms |
300 KB |
Not correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
1 ms |
208 KB |
Correct |
3 |
Correct |
5 ms |
208 KB |
Correct |
4 |
Incorrect |
6 ms |
300 KB |
Not correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
2 ms |
208 KB |
Correct |
3 |
Correct |
3 ms |
300 KB |
Correct |
4 |
Incorrect |
7 ms |
468 KB |
Not correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
2 ms |
208 KB |
Correct |
3 |
Correct |
3 ms |
300 KB |
Correct |
4 |
Incorrect |
7 ms |
468 KB |
Not correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
1 ms |
208 KB |
Correct |
3 |
Correct |
3 ms |
208 KB |
Correct |
4 |
Incorrect |
6 ms |
420 KB |
Not correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
208 KB |
Correct |
2 |
Correct |
1 ms |
208 KB |
Correct |
3 |
Correct |
3 ms |
208 KB |
Correct |
4 |
Incorrect |
6 ms |
420 KB |
Not correct |
5 |
Halted |
0 ms |
0 KB |
- |