Submission #734472

#TimeUsernameProblemLanguageResultExecution timeMemory
734472Alexabcde1Parrots (IOI11_parrots)C++14
Compilation error
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { int i; for(i=0; i<N; i++) { for (j=0;j<=7;j++){ if (M[i]%2==1){ send((i<<4)+(j<<1)+1) } M[i]/=2; } } }
#include "decoder.h" #include "decoderlib.h" void decode(int N, int L, int X[]) { int i, b,ans[20]; for(i=0; i<L; i++) { ans[(X[i]>>4)] += 1<<((X[i]%16)/2); } for (i=0;i<L;i++) output(ans[i]); }

Compilation message (stderr)

encoder.cpp: In function 'void encode(int, int*)':
encoder.cpp:8:10: error: 'j' was not declared in this scope
    8 |     for (j=0;j<=7;j++){
      |          ^

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:6:10: warning: unused variable 'b' [-Wunused-variable]
    6 |   int i, b,ans[20];
      |          ^