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 "perm.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> construct_permutation(long long k) {
if(k==1) return {};
vector<int> v = construct_permutation(k>>1);
int n = v.size();
v.push_back(n);
if(k&1) v.insert(v.begin(),n+1);
return v;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |