Submission #360312

#TimeUsernameProblemLanguageResultExecution timeMemory
360312sean617Parrots (IOI11_parrots)C++98
17 / 100
1 ms1344 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]) { int i, re = 0; for(i=0; i<N; i++) { re = re * 2 + M[i]; } send(re); }
#include "decoder.h" #include "decoderlib.h" #include<cstring> int ans[1000]; void decode(int N, int L, int X[]) { int i = 0, a, b; memset(ans, 0, sizeof(ans)); a = X[0]; while (a > 0) { ans[i++] = a % 2; a/=2; } for (i = N - 1; i >= 0; i--) output(ans[i]); }

Compilation message (stderr)

decoder.cpp: In function 'void decode(int, int, int*)':
decoder.cpp:8:19: warning: unused variable 'b' [-Wunused-variable]
    8 |     int i = 0, a, 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...