Submission #18651

#TimeUsernameProblemLanguageResultExecution timeMemory
18651ggohParrots (IOI11_parrots)C++98
81 / 100
8 ms2184 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N,int M[]) { int t,u; for(int i=0;i<N;i++) { u=M[i];t=0; while(u) { if(u%2)send(32*t+i); u/=2; t++; } } }
#include "decoder.h" #include "decoderlib.h" void decode(int N,int L,int X[]) { int ans,ch[256]={}; for(int i=0;i<L;i++)ch[X[i]]++; for(int i=0;i<N;i++) { ans=0; for(int j=0;j<8;j++) { if(ch[32*j+i])ans+=(1<<j); } output(ans); } }
#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...