Submission #65835

#TimeUsernameProblemLanguageResultExecution timeMemory
65835josw530Parrots (IOI11_parrots)C++98
Compilation error
0 ms0 KiB
#include "encoder.h" #include "encoderlib.h" int BIT_MASK[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 } void encode(int N, int M[]) { int i; for(i=0; i<N; i++) { for(int j = 0; j<8; j++) { if(M[i]&BIT_MASK) send(i*8 + j); } } }
#include "decoder.h" #include "decoderlib.h" int BIT_MASK[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 } void decode(int N, int L, int X[]) { int i, b; int msg[32] = {0}; for(i=0; i<L; i++) { msg[X[i]/8] |= BIT_MASK[(X[i]%8]; } for(i=0; i<N; i++) { output(msg[i]); } }

Compilation message (stderr)

encoder.cpp:8:1: error: expected ',' or ';' before 'void'
 void encode(int N, int M[])
 ^~~~

decoder.cpp:8:1: error: expected ',' or ';' before 'void'
 void decode(int N, int L, int X[])
 ^~~~