Submission #229270

# Submission time Handle Problem Language Result Execution time Memory
229270 2020-05-04T02:39:20 Z super_j6 Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
Compilation error
0 ms 0 KB
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;
}

Compilation message

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