Submission #911300

#TimeUsernameProblemLanguageResultExecution timeMemory
911300hjroh0315Permutation (APIO22_perm)C++17
Compilation error
0 ms0 KiB
#include"perms.h" #include<bits/stdc++.h> using namespace std; std::vector<int>construct_permutation(long long k) { vector<int>ans; auto f=k;int last=-1; for(int i=0;i<62;i++) { if(f>0) { if(f&1)f--; if(f>0)ans.push_back(i); last=i; f>>=1; } } last--; while(last>=0) { if(k>>last&1) { for(int i=0;i<size(ans);i++) { if(ans[i]>=last)ans[i]++; } ans.push_back(last); } last--; } return ans; }

Compilation message (stderr)

perm.cpp:1:9: fatal error: perms.h: No such file or directory
    1 | #include"perms.h"
      |         ^~~~~~~~~
compilation terminated.