제출 #235256

#제출 시각아이디문제언어결과실행 시간메모리
235256DavidDamian앵무새 (IOI11_parrots)C++11
17 / 100
10 ms1536 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { for(int i=0;i<N;i++){ int number=(M[i])? 1 : 3; number*=(1<<i); send(number); } }
#include "decoder.h" #include "decoderlib.h" #include<bits/stdc++.h> using namespace std; void decode(int N, int L, int X[]) { vector<int> ans(N); for(int i=0;i<N;i++){ int number=X[i]; int power=0; int bit=0; while(number%2==0){ power++; number/=2; } bit=(number==3)? 0 : 1; ans[power]=bit; } for(int i=0;i<N;i++){ output(ans[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...