제출 #745263

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