제출 #969616

#제출 시각아이디문제언어결과실행 시간메모리
969616dubabuba순열 (APIO22_perm)C++17
91.33 / 100
2 ms600 KiB
#include <bits/stdc++.h> #include "perm.h" using namespace std; typedef long long i64; typedef vector<int> vi; const int mxLOG = 62; vi construct_permutation(i64 k) { vi a; for(int i = mxLOG - 1; i >= 0; i--) { if((k & (1LL << i)) != (1LL << i)) continue; if(a.size() == 0) { for(int j = 0; j < i; j++) a.push_back(j); continue; } for(int &x : a) if(x >= i) x++; a.push_back(i); } return a; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...