제출 #982381

#제출 시각아이디문제언어결과실행 시간메모리
982381boyliguanhan순열 (APIO22_perm)C++17
91.33 / 100
1 ms376 KiB
#include "perm.h" std::vector<signed> construct_permutation(long long k) { long long j = 63-__builtin_clzll(k), x = 0; std::vector<int> v, app; for(long long i = 0; i < j; i++) { if(k&(1LL<<i)) app.push_back(x++); v.push_back(x++); } v.insert(v.end(), app.rbegin(), app.rend()); return v; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...