This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "encoder.h"
#include "encoderlib.h"
void encode(int N, int M[])
{
int cnt = 0;
for(int i = 0; i < N; ++i) {
for(int t = 6; t >= 0; t -= 2) {
send((cnt << 2) | ((M[i] >> t) & 3));
++cnt;
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <algorithm>
void decode(int N, int L, int X[])
{
std::sort(X, X + L);
for(int i = 0; i < L; i += 4) {
int M = 0;
for(int j = i; j < i + 4; ++j) {
M = (M << 2) | (X[j] & 3);
}
output(M);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |