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[])
{
for(int i = 0;i < N;i++){
send(i*16+(M[i]&15));
send(i*16+(M[i]&15));
send(i*16+(M[i]>>4));
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <vector>
void decode(int N, int L, int X[])
{
std::vector<int> a[N];
for(int i=0; i<L; i++) {
a[X[i]>>4].push_back(X[i]&15);
}
for(int i = 0;i < N;i++){
int f = a[i][0]^a[i][1]^a[i][2];
bool g = false;
for(int j = 0;j < 3;j++){
if(a[i][j] != f){
g =true;
output(f*16+a[i][j]);
break;
}
}
if(!g) output(f*16+f);
}
}
# | 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... |