# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
595108 | Andyvanh1 | Permutation (APIO22_perm) | C++17 | 4 ms | 340 KiB |
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){
int Max = 0;
int cur = 0;
for(int i = 0; i < 60; i++){
if((((long long)1)<<i)&k){
Max = i;
cur++;
}
}
cur--;
vector<int> ans(Max);
for(int i = 0; i < Max; i++){
ans[i] = i;
}
vector<int> proc;
for(int i = Max-1; i>=0; i--){
if((((long long)1)<<i)&k)proc.push_back(i);
}
vector<int> rlproc;
if(proc.size()<=31){
rlproc = proc;
}else{
vector<vector<int>> zz;
int at = 2;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |