Submission #199148

#TimeUsernameProblemLanguageResultExecution timeMemory
199148godwindParrots (IOI11_parrots)C++14
Compilation error
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int n, int M[]) { for (int i = 0; i < n; ++i) { int x = i * 16; send(i * 16 + 4 * 0 + M[i] % 4); send(i * 16 + 4 * 1 + (M[i] >> 2) % 4); send(i * 16 + 4 * 2 + (M[i] >> 4) % 4); send(i * 16 + 4 * 3 + (M[i] >> 6) % 4); } }
#include "decoder.h" #include "decoderlib.h" using namespace std; int ans[1000]; void decode(int n, int L, int X[]) { for (int i = 0; i < n; ++i) { ans[i] = 0 } for (int i = 0; i < L; ++i) { int id = X[i] >> 4; int r = (X[i] >> 2) % 4; ans[id] += (1 << (2 * r)) * (X[i] % 4); } for (int i = 0; i < n; ++i) { output(ans[i]); } }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:10:7: warning: unused variable 'x' [-Wunused-variable]
   int x = i * 16;
       ^

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:12:5: error: expected ';' before '}' token
     }
     ^