Submission #164475

#TimeUsernameProblemLanguageResultExecution timeMemory
164475mhy908Question (Grader is different from the original contest) (CEOI14_question_grader)C++14
Compilation error
0 ms0 KiB
int c[930], r; bool first=true; int encode(int N, int x, int y) { if(first) for(int i=1; i<=4096; i++) if(__builtin_popcount(i)==6)change[++r]=i; first=false; return __builtin_ffs(c[x]&(c[x]^c[y])); }
int c[930], r; bool first=true; int encode(int N, int q, int h) { if(first) for(int i=1; i<=4096; i++) if(__builtin_popcount(i)==6)c[++r]=i; first=false; return c[q]&(1<<(h-1))?1:0; }

Compilation message (stderr)

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:7:41: error: 'change' was not declared in this scope
             if(__builtin_popcount(i)==6)change[++r]=i;
                                         ^~~~~~
encoder.cpp:7:41: note: suggested alternative: 'char'
             if(__builtin_popcount(i)==6)change[++r]=i;
                                         ^~~~~~
                                         char

/tmp/ccP5F8dW.o: In function `main':
grader_decode.c:(.text.startup+0x19f): undefined reference to `decode(int, int, int)'
collect2: error: ld returned 1 exit status