제출 #235561

#제출 시각아이디문제언어결과실행 시간메모리
235561DavidDamian앵무새 (IOI11_parrots)C++11
81 / 100
13 ms1536 KiB
#include "encoder.h" #include "encoderlib.h" #include<bits/stdc++.h> using namespace std; void encode(int N, int M[]) { int idx=0; for(int i=0;i<N;i++){ for(int bit=0;bit<8;bit++){ if(M[i]&(1<<bit)) send(idx+bit); } idx+=8; } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> using namespace std; void decode(int N, int L, int X[]) { vector<int> binary(8*N,0); sort(X,X+L); for(int i=0;i<L;i++){ binary[X[i]]=1; } for(int i=0;i<8*N;i+=8){ int number=0; for(int bit=0;bit<8;bit++){ if(binary[i+bit]) number+=(1<<bit); } output(number); } }
#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...