# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
934576 | KebabuVaikis15 | Parrots (IOI11_parrots) | C++14 | 3 ms | 1336 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"
void encode(int N, int M[])
{
if (N<=32)
{
for (int i=0; i<N; i++)
for (int j=0; j<8; j++)
if (M[i]&(1<<j))
send((j<<5)+i);
}
else
{
for (int i=0; i<N; i++)
for (int j=0; j<4; j++)
for (int k=0; k<(M[i]>>2*j)&3; k++)
send((j<<6)+i);
}
}
#include "decoder.h"
#include "decoderlib.h"
void decode(int N, int L, int X[])
{
int M[N]={0};
if (N<=32)
for (int i=0; i<L; i++)
M[X[i]&((1<<5)-1)]+=(1<<(X[i]>>5));
else
for (int i=0; i<L; i++)
M[X[i]&((1<<6)-1)]+=(1<<(2*(X[i]>>6)));
for (int i:M)
output(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... |