제출 #26973

#제출 시각아이디문제언어결과실행 시간메모리
26973grands앵무새 (IOI11_parrots)C++14
17 / 100
11 ms2400 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { int mask[8] = { 1,2,4,8,16,32,64,128 }; for (int i = 0; i < N; i++){ int message = M[i]; int loc = i << 2; for (int m = 0; m < 8; m+=2){ if (message&mask[m]){ send(loc + m / 2); } if (message&mask[m+1]){ send(loc + m / 2); send(loc + m / 2); } } } }
#include "decoder.h" #include "decoderlib.h" void decode(int N, int L, int X[]){ int M[64] = { 0 }; for (int i = 0; i < L; i++){ int message = X[i]; int loc = message >> 2; M[loc] += 1<<(message % 4); } for (int i = 0; i < N; i++){ output(M[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...