Submission #1035360

#TimeUsernameProblemLanguageResultExecution timeMemory
1035360amine_arouaPermutation (APIO22_perm)C++17
91.33 / 100
2 ms520 KiB
#include "perm.h" #include<bits/stdc++.h> using namespace std; #define ll long long std::vector<int> construct_permutation(long long k) { if(k == 1) { return {}; } if(k == 2) { return {0}; } vector<int> ret = construct_permutation(k/2); ret.push_back((int)ret.size()); if(k%2) ret.insert(ret.begin() , (int)ret.size()); return ret; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...