# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
65849 | lipschitz | Parrots (IOI11_parrots) | C++14 | 7 ms | 2024 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[])
{
int i;
for (i = 0; i < N; i++) {
int seq = i << 3;
int temp = M[i];
for (int j = 0; j < 8; j++) {
if (temp & 1) {
send(seq + j);
}
temp >>= 1;
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include<algorithm>
using namespace std;
void decode(int N, int L, int X[])
{
int i, b, mask = 0x0007;
sort(X, X + L);
int seq = 0, ans = 0;
for(i=0; i<L; i++) {
if (seq ^ (X[i] >> 3)) {
output(ans);
ans = 0;
seq = X[i] >> 3;
}
ans += (1 << (X[i] & mask));
}
output(ans);
}
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... |