# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
642037 | Alexandruabcde | Permutation (APIO22_perm) | C++17 | 2 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;
typedef long long LL;
int ComputePower (LL k) {
int l = 0;
while ((1LL<<l) <= k / 2)
++ l;
return l;
}
std::vector<int> construct_permutation(long long k)
{
int L = ComputePower(k);
k -= ((1LL<<L));
vector <int> ans;
vector <int> V;
int value = -1;
for (int i = 0; i < L; ++ i ) {
++ value;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |