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 t,u;
for(int i=0;i<N;i++)
{
u=M[i];t=0;
while(u)
{
if(u%2)send(32*t+i);
u/=2;
t++;
}
}
}
#include "decoder.h"
#include "decoderlib.h"
void decode(int N,int L,int X[])
{
int ans,ch[256]={};
for(int i=0;i<L;i++)ch[X[i]]++;
for(int i=0;i<N;i++)
{
ans=0;
for(int j=0;j<8;j++)
{
if(ch[32*j+i])ans+=(1<<j);
}
output(ans);
}
}
# | 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... |