| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 594069 | mohammad_kilani | Permutation (APIO22_perm) | C++17 | 3 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){
long long num = 1;
vector< int > ret;
while(num * 2 <= k){
ret.push_back((int)ret.size());
num *= 2;
}
for(int it = 61;it >= 0;it--){
if(num + (1LL << it) <= k){
num += (1LL << it) ;
ret.insert(ret.begin() + it , (int)ret.size());
}
}
return ret;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
