Submission #497287

#TimeUsernameProblemLanguageResultExecution timeMemory
497287OzyParrots (IOI11_parrots)C++17
Compilation error
0 ms0 KiB
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; #define lli long long int #define rep(i,a,b) for(int i = (a); i <= (b); i++) #define repa(i,a,b) for(int i = (a); i >= (b); i--) #define debug(a) cout << #a << " = " << a << endl #define debugsl(a) cout << #a << " = " << a << ", " void decode(int N, int L, int X[]) { lli num[70][4],n,a,b,pos; n = N; lli cont = 0; rep(i,0,L) if (X[i] == 0) cont++; if (cont > 3) { rep(i,0,n-1) { rep(j,0,3) num[i][j] = 0; } cont=4; rep(i,0,L-1) { if (X[i] == 0 && cont > 0) { cont--; continue; } a = X[i]; pos = a>>2; b = (a&3); num[pos][b]++; //debugsl(a); //debugsl(pos); //debugsl(b); //debug(num[pos][b]); } rep(i,0,n-1) { a = 0; a += num[i][0]; a += num[i][1] * 4; a += num[i][2] * 16; a += num[i][3] * 64; output(a); } } else { rep(i,0,n-1) { rep(j,0,3) num[i][j] = 3; } rep(i,0,L-1) { a = X[i]; pos = a>>2; b = (a&3); num[pos][b]--; //debugsl(a); //debugsl(pos); //debugsl(b); //debug(num[pos][b]); } rep(i,0,n-1) { a = 0; a += num[i][0]; a += num[i][1] * 4; a += num[i][2] * 16; a += num[i][3] * 64; output(a); } } }

Compilation message (stderr)

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

/usr/bin/ld: /tmp/ccrV5FXZ.o: in function `main':
grader_decoder.cpp:(.text.startup+0x1ef): undefined reference to `decode(int, int, int*)'
collect2: error: ld returned 1 exit status