Submission #1036922

#TimeUsernameProblemLanguageResultExecution timeMemory
1036922aaaaaarrozParrots (IOI11_parrots)C++17
0 / 100
1 ms1048 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]){ int i; for(i=0; i<N; i++){ int nuevoi=(i<<9); M[i]|=nuevoi; send(M[i]); } }
#include "decoder.h" #include "decoderlib.h" void decode(int N, int L, int X[]) { int arr[N]; for(int i=0;i<L;i++){ int elemento=0; int pos=0; for(int bit=0;bit<9;bit++){ if(X[i]&bit){ elemento+=(1<<bit); } } for(int bit=9;bit<=16;bit++){ if(X[i]&bit){ pos+=(1<<(bit-9)); } } arr[pos]=elemento; } for(int i=0;i<N;i++){ output(arr[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...