# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
985419 | Huseyn123 | Permutation (APIO22_perm) | C++17 | 7 ms | 348 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"
#define pb push_back
#include <bits/stdc++.h>
using namespace std;
vector<int> construct_permutation(long long k)
{
vector<int> a;
while(k>0){
a.push_back(k%4);
k/=4;
}
reverse(a.begin(),a.end());
vector<int> ans;
vector<double> b,c;
if(a[0]==2){
b.pb(0);
}
else if(a[0]==3){
b.pb(1);
b.pb(0);
}
int sz=(int)a.size();
for(int i=1;i<sz;i++){
bool ok,ok1;
ok=ok1=0;
for(auto x:b){
if(x==1){
ok1=1;
}
else if(x==0 && ok1){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |