Submission #741916

#TimeUsernameProblemLanguageResultExecution timeMemory
741916vjudge1Permutation (APIO22_perm)C++17
10 / 100
1 ms212 KiB
#include "perm.h" std::vector<int> construct_permutation(long long k) { int j = 63-__builtin_clzll(k), x = 0; std::vector<int> v, app; for(int i = 0; i < j; i++) { if(k&1<<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...