# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
770458 | kad_01 | Parrots (IOI11_parrots) | C++14 | 6 ms | 1380 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[])
{
for (int i = 0; i < N; i++) {
for (int j = 0; j < (M[i] >> 6); j++) {
send(4 * i);
}
for (int j = 0; j < ((M[i] >> 4) & 3); j++) {
send(4 * i + 1);
}
for (int j = 0; j < ((M[i] >> 2) & 3); j++) {
send(4 * i + 2);
}
int k = M[i] & 3;
for (int j = 0; j < (M[i] & 3); j++) {
send(4 * i + 3);
}
}
}
#include "decoder.h"
#include "decoderlib.h"
void decode(int N, int L, int X[])
{
int freq[256];
for(int i = 0; i < 256; i++) {
freq[i] = 0;
}
for(int i = 0; i < L; i++) {
freq[X[i]]++;
}
for(int i = 0; i < N; i++) {
output( freq[4 * i] << 6 |
freq[4 * i + 1] << 4 |
freq[4 * i + 2] << 2 |
freq[4 * i + 3] );
}
}
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... |