# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
51722 | kimjg1119 | Parrots (IOI11_parrots) | C11 | 12 ms | 2664 KiB |
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"
typedef unsigned char uc;
void encode(int N, int M[])
{
for(int i=0; i<N; i++)
{
uc k=M[i];
uc x=(uc)i;
x=(x<<3);
for(int j=0; j<8; j++)
{
uc t=x;
if(k&(1<<j))
{
t|=j;
send(t);
}
}
}
}
#include "decoder.h"
#include "decoderlib.h"
typedef unsigned char uc;
void decode(int N, int L, int X[])
{
uc ans[32]={};
for(int i=0;i<L;i++)
{
int t=X[i];
int pos=(t>>3);
int bit=(t&7);
ans[pos]|=(uc)(1<<bit);
}
for(int i=0;i<N;i++)
output((int)ans[i]);
}
Compilation message (stderr)
# | 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... |