제출 #976006

#제출 시각아이디문제언어결과실행 시간메모리
976006Orifkhon순열 (APIO22_perm)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "perm.h" using namespace std; #ifdef LOCAL #include "debug.cpp" #else #define debug(...) #endif #define ll long long vector<int> construct_permutation(long long k) { ll size = 63 - __builtinll_clz(k); vector<int> perm(size); for(int i = 0; i < size; i++){ perm[i] = i; } k-=(1ll << size); ll insert = size; while(k > 0){ ll ind = 63 - __builtinll_clz(k); k-=(1ll << ind); perm.insert(perm.begin() + ind, insert); insert++; } debug(perm); return perm; }

컴파일 시 표준 에러 (stderr) 메시지

perm.cpp: In function 'std::vector<int> construct_permutation(long long int)':
perm.cpp:14:20: error: '__builtinll_clz' was not declared in this scope; did you mean '__builtin_clz'?
   14 |     ll size = 63 - __builtinll_clz(k);
      |                    ^~~~~~~~~~~~~~~
      |                    __builtin_clz