제출 #229270

#제출 시각아이디문제언어결과실행 시간메모리
229270super_j6질문 (CEOI14_question_grader)C++14
컴파일 에러
0 ms0 KiB
int a[920];
int encode(int n, int x, int y){
    x--, y--;
    if(!a[0]) for(int i = 0, j = 0; i < n; i++, j++){
        while(__builtin_popcount(j) != 6) j++;
        a[i] = j;
    }
    return __lg(a[x] & (a[x] ^ a[y])) + 1;
}
int a[920];
int decode(int n, int x, int y){
    x--, y--;
    if(!a[0]) for(int i = 0, j = 0; i < n; i++, j++){
        while(__builtin_popcount(j) != 6) j++;
        a[i] = j;
    }
    return (a[x] >> y) & 1;
}

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

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:8:12: error: '__lg' was not declared in this scope
     return __lg(a[x] & (a[x] ^ a[y])) + 1;
            ^~~~
encoder.cpp:8:12: note: suggested alternative: '__k8'
     return __lg(a[x] & (a[x] ^ a[y])) + 1;
            ^~~~
            __k8