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