Submission #235310

#TimeUsernameProblemLanguageResultExecution timeMemory
235310DavidDamianParrots (IOI11_parrots)C++11
0 / 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=i; for(int j=0;j<4;j++){ int binary_pos=j; binary_pos=(binary_pos<<4); number|=binary_pos; int aux=(1<<((j+1)*2))-1; aux=aux-((1<<((j)*2))-1); int segment=(M[i]&aux); segment=(segment<<6); number|=segment; 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<L;i++){ int idx=(X[i]%16); X[i]=(X[i]>>4); int part=X[i]%4; X[i]=(X[i]>>2); ans[idx]+=(X[i]<<(part*2)); } }
#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...