Submission #1025945

#TimeUsernameProblemLanguageResultExecution timeMemory
1025945idasParrots (IOI11_parrots)C++11
81 / 100
3 ms1344 KiB
#include "encoder.h" #include "encoderlib.h" #define FOR(i, begin, end) for(int i=(begin); i<(end); i++) void encode(int n, int m[]) { FOR(i, 0, n) { int pos=i; FOR(j, 0, 8) { if(m[i]&(1<<j)){ int bit=j, snd=pos|(bit<<5); send(snd); } } } }
#include "decoder.h" #include "decoderlib.h" #define FOR(i, begin, end) for(int i=(begin); i<(end); i++) void decode(int n, int l, int x[]) { int ans[n]; FOR(i, 0, n) ans[i]=0; FOR(i, 0, l) { int pos=x[i]&31, bit=x[i]>>5; ans[pos]^=1<<bit; } FOR(i, 0, n) { output(ans[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...