Submission #51722

#TimeUsernameProblemLanguageResultExecution timeMemory
51722kimjg1119Parrots (IOI11_parrots)C11
81 / 100
12 ms2664 KiB
#include "encoder.h" #include "encoderlib.h" typedef unsigned char uc; void encode(int N, int M[]) { for(int i=0; i<N; i++) { uc k=M[i]; uc x=(uc)i; x=(x<<3); for(int j=0; j<8; j++) { uc t=x; if(k&(1<<j)) { t|=j; send(t); } } } }
#include "decoder.h" #include "decoderlib.h" typedef unsigned char uc; void decode(int N, int L, int X[]) { uc ans[32]={}; for(int i=0;i<L;i++) { int t=X[i]; int pos=(t>>3); int bit=(t&7); ans[pos]|=(uc)(1<<bit); } for(int i=0;i<N;i++) output((int)ans[i]); }

Compilation message (stderr)

grader_decoder.c: In function 'main':
grader_decoder.c:86:2: warning: implicit declaration of function 'fcloseall'; did you mean 'fclose'? [-Wimplicit-function-declaration]
  fcloseall();
  ^~~~~~~~~
  fclose
#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...