Submission #65839

#TimeUsernameProblemLanguageResultExecution timeMemory
65839josw530Parrots (IOI11_parrots)C++98
81 / 100
8 ms2336 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[j]) 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; 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]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...