제출 #968576

#제출 시각아이디문제언어결과실행 시간메모리
968576batsukh2006순열 (APIO22_perm)C++17
91.33 / 100
2 ms600 KiB
#include<bits/stdc++.h> #include "perm.h" using namespace std; #define ff first #define ss second vector<int> construct_permutation(long long k){ int lst=0,sum=0; for(long long i=0; i<60; i++){ if(k&(1ll<<i)){ lst=i; sum++; } } vector<int> v; int x=0,z=lst+sum-2; for(long long i=0; i<lst; i++,x++){ if(k&(1ll<<i)){ v.push_back(z); z--; } v.push_back(x); } return v; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...