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 A=0;A<N;A++)
{
int res=A;
for(int B=0;B<8;B++)
{
if(M[A]&(1<<B))
res+=1<<(B+4);
}
send(res);
}
return ;
}
#include "decoder.h"
#include "decoderlib.h"
void decode(int N, int L, int X[])
{
int res[1000];
for(int A=0;A<N;A++)
{
int ind=0,num=0;
for(int B=0;B<4;B++)
if(X[A]&(1<<B))
ind+=(1<<B);
for(int B=0;B<8;B++)
if(X[A]&(1<<(B+4)))
num+=(1<<B);
res[ind]=num;
}
for(int A=0;A<N;A++)
output(res[A]);
return ;
}
# | 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... |