This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// incorrect/2n-zoooma13.cpp
#include <bits/stdc++.h>
#include "machine.h"
using namespace std;
vector <int> find_permutation(int n){
vector <int> q(n) ,iq(n+n);
iota(q.begin() ,q.end() ,0);
iota(iq.begin() ,iq.end() ,0);
int w = 1;
while(w+w < n)
w = w+w;
q[n-1] = w+w;
iq[w+w] = n-1;
auto r = use_machine(q);
for(int b = 0; b < 30; b++){
int t = 0;
for(int&i : r)
t += i>>b&1;
if(t+t < n)
continue;
for(int&i : r)
i ^= 1<<b;
}
vector <int> p;
for(int&i : r)
p.push_back(iq[i]);
return p;
}
# | 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... |