# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1065492 | Gangsta | Permutation (APIO22_perm) | C++17 | 8 ms | 1508 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 "bits/stdc++.h"
#define ll long long int
#define pb push_back
#define pii pair<int,int>
#define ff first
#define ss second
#define sz size()
using namespace std;
ll tap(int n){
ll sum = (1LL<<n);
return sum-1;
}
vector <int> construct_permutation(ll k){
k--;
int cnt = 0;
deque <int> d;
vector <int> v;
while(k>0){
int l = 1, r = 58, md, jog = -1;
ll jog1 = -1;
while(l <= r){
md = (l+r)/2;
ll san = tap(md);
if(san <= k){
jog = md;
jog1 = san;
l = md + 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |