Submission #741899

#TimeUsernameProblemLanguageResultExecution timeMemory
741899vjudge1Permutation (APIO22_perm)C++17
91.33 / 100
2 ms364 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...