Submission #911300

# Submission time Handle Problem Language Result Execution time Memory
911300 2024-01-18T18:02:02 Z hjroh0315 Permutation (APIO22_perm) C++17
Compilation error
0 ms 0 KB
#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

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