Submission #235256

#TimeUsernameProblemLanguageResultExecution timeMemory
235256DavidDamianParrots (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...