Submission #795963

#TimeUsernameProblemLanguageResultExecution timeMemory
795963hgmhcParrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include "decoder.h" #include "decoderlib.h" static const int N = 20; static int ans[N]; void decode(int n, int l, int x[]) { for (int k = 0; k < l; ++k) { int i = x[k]&0b1111; int j = x[k]>>4&0b11; int v = x[k]>>6&0b11; ans[i] |= v<<(2*j); } for (int i = 0; i < n; ++i) output(ans[i]); } // ans[i] < 2^8
#include "decoder.h" #include "decoderlib.h" static const int N = 20; static int ans[N]; void decode(int n, int l, int x[]) { for (int k = 0; k < l; ++k) { int i = x[k]&0b1111; int j = x[k]>>4&0b11; int v = x[k]>>6&0b11; ans[i] = v<<(2*j); } for (int i = 0; i < n; ++i) output(ans[i]); } // ans[i] < 2^8

Compilation message (stderr)

/usr/bin/ld: /tmp/ccbMMI9b.o: in function `main':
grader_encoder.cpp:(.text.startup+0x162): undefined reference to `encode(int, int*)'
/usr/bin/ld: /tmp/ccon8zJc.o: in function `decode(int, int, int*)':
encoder.cpp:(.text+0x67): undefined reference to `output(int)'
collect2: error: ld returned 1 exit status