Submission #734488

#TimeUsernameProblemLanguageResultExecution timeMemory
734488Alexabcde1Parrots (IOI11_parrots)C++14
52 / 100
3 ms1048 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { for(int i=0; i<N; i++) { for (int j=0;j<=7;j++){ if (M[i]%2==1){ send((i<<4)+(j<<1)+1); } M[i]/=2; } } }
#include "decoder.h" #include "decoderlib.h" void decode(int N, int L, int X[]) { int i, b,ans[20]={0}; for(int i=0; i<L; i++) { int pos=(X[i]>>4); int val=(1<<((X[i]%16)>>1)); ans[pos] += val; } for (int i=0;i<N;i++) { output(ans[i]); } }

Compilation message (stderr)

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:6:7: warning: unused variable 'i' [-Wunused-variable]
    6 |   int i, b,ans[20]={0};
      |       ^
decoder.cpp:6:10: warning: unused variable 'b' [-Wunused-variable]
    6 |   int i, b,ans[20]={0};
      |          ^
#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...