Submission #65851

#TimeUsernameProblemLanguageResultExecution timeMemory
65851vsv21gmlParrots (IOI11_parrots)C++14
94 / 100
13 ms2560 KiB
#include "encoder.h" #include "encoderlib.h" void encode(int N, int M[]){ int i, position; for (i = 0; i < N; i++) { position = i << 2; for (; M[i] >= 54; M[i] -= 54) send(position + 3); for (; M[i] >= 15; M[i] -= 15) send(position + 2); for (; M[i] >= 4; M[i] -= 4) send(position + 1); for (; M[i] >= 1; M[i] -= 1) send(position); } }
#include "decoder.h" #include "decoderlib.h" int result[64]; void decode(int N, int L, int X[]){ int i, position, value; for (i = 0; i < N; i++) result[i] = 0; for (i = 0; i < L; i++) { position = X[i] >> 2; value = X[i] - (position << 2); if (value == 0) result[position] += 1; else if (value == 1) result[position] += 4; else if (value == 2) result[position] += 15; else if (value == 3) result[position] += 54; } for (i = 0; i < N; i++) output(result[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...