제출 #982295

#제출 시각아이디문제언어결과실행 시간메모리
982295nnin순열 (APIO22_perm)C++17
91.33 / 100
1 ms348 KiB
#include "perm.h" #include<bits/stdc++.h> using namespace std; using ll = long long; vector<int> construct_permutation(long long k) { int g = __lg(k); vector<int> ans; int cur = 0; while(cur<g) { ans.push_back(cur++); } for(int i=g-1;i>=0;i--) { if(k & (1ll<<i)) ans.insert(ans.begin()+i, cur++); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...