제출 #965924

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