Submission #64630

#TimeUsernameProblemLanguageResultExecution timeMemory
64630gnoorParrots (IOI11_parrots)C++17
81 / 100
10 ms2312 KiB
#include "encoder.h" #include "encoderlib.h" #include <cassert> #include <cstdio> void encode(int N, int M[]) { assert(N<=32); for (int i=0;i<N;i++) { for (int j=0;j<8;j++) { if (M[i]&(1<<j)) send(i*8+j); } } }
#include "decoder.h" #include "decoderlib.h" #include <cstdio> int ans[70]; void decode(int N, int L, int X[]) { int i, b; for (int i=0;i<N;i++) ans[i]=0; for(i=0; i<L; i++) { b = X[i]; int pos=X[i]/8; int off=X[i]%8; ans[pos]^=(1<<off); } for (int i=0;i<N;i++) { output(ans[i]); } }

Compilation message (stderr)

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:10:10: warning: variable 'b' set but not used [-Wunused-but-set-variable]
   int i, b;
          ^
#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...