Submission #995335

#TimeUsernameProblemLanguageResultExecution timeMemory
995335Saul0906Parrots (IOI11_parrots)C++14
34 / 100
2 ms1320 KiB
#include "encoder.h" #include "encoderlib.h" #define rep(a,b,c) for(int a=b; a<c; a++) #include <iostream> using namespace std; void encode(int N, int M[]){ rep(i,0,N){ rep(j,0,4){ int b=((M[i]&(1<<j*2))^((M[i]&(1<<(j*2+1)))))>>(2*j); send(i^(j<<5)^(b<<7)); } } }
#include "decoder.h" #include "decoderlib.h" #include <iostream> #define rep(a,b,c) for(int a=b; a<c; a++) using namespace std; void decode(int N, int L, int X[]){ int a[N]{}, x, y; rep(i,0,L){ x=X[i]>>5; X[i]^=x<<5; y=x>>2; a[X[i]]^=y<<(2*(x^(y<<2))); } rep(i,0,N) output(a[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...