제출 #39251

#제출 시각아이디문제언어결과실행 시간메모리
39251tjd229앵무새 (IOI11_parrots)C++11
81 / 100
7 ms2176 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { int i,j; int cnt = 0; int bit8 = 1 << 7; int bit; for (i = 0; i < N; i++){ bit = bit8; for (j = 0; j < 8; j++, bit >>= 1,cnt++) if (bit&M[i]) send(cnt); } }
#include "decoder.h" #include "decoderlib.h" void decode(int N, int L, int X[]) { int i,j; int cnt[256] = { 0 }; int recover; for (i = 0; i < L; i++) cnt[X[i]]++; for (i = 0,N*=8; i < N;){ recover = 0; for (j = 0; j < 8; j++, i++){ recover <<= 1; recover += cnt[i]; } output(recover); } }
#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...