# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1014498 | tuannm | Permutation (APIO22_perm) | C++17 | 10 ms | 604 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>
#include "perm.h"
#define pb push_back
using namespace std;
vector<int> construct_permutation(long long k){
vector<long double> tmp;
int itr = 0;
vector<int> xx;
while(k){
xx.pb(k % 4);
k /= 4;
}
reverse(xx.begin(), xx.end());
for(int m : xx){
if(!itr){
if(m == 2)
tmp = {0};
else if(m == 3){
tmp = {1, 0};
}
}
else{
if(!m){
tmp.pb(1e9);
tmp.pb(1e9 + 1);
}
else if(m == 1){
tmp.pb(1e9);
tmp.pb(1e9 + 1);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |