제출 #739432

#제출 시각아이디문제언어결과실행 시간메모리
739432CyberCraze순열 (APIO22_perm)C++17
91.33 / 100
1 ms340 KiB
#include <bits/stdc++.h> #define ll long long #define FOR(i,a,b) for(ll i=a;i<b;i++) using namespace std; vector<int> construct_permutation(ll k) { int lbit = __lg(k); vector<int> ans(lbit);FOR(i,0,lbit)ans[i]=i; for (int i = lbit - 1; i >= 0; i--) { if ((k >> i) & 1) { ans.insert(ans.begin() + i, lbit++); } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...