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 <bits/stdc++.h>
#include "encoder.h"
#include "encoderlib.h"
using namespace std;
void encode(int N, int M[])
{
for (int i = 0; i < N; i++)
for (int b = 0; b < 8; b++)
if (M[i]&(1<<b))
send(i + (b<<5));
}
#include <bits/stdc++.h>
#include "decoder.h"
#include "decoderlib.h"
using namespace std;
static int ans[65];
void decode(int N, int L, int X[])
{
memset(ans, 0, sizeof ans);
for (int i = 0; i < L; i++)
{
int ind = 0;
for (int b = 0; b < 5; b++)
if (X[i]&(1<<b))
ind += (1<<b);
int bit = 0;
for (int b = 5; b < 8; b++)
if (X[i]&(1<<b))
bit += (1<<(b-5));
ans[ind] += (1<<bit);
}
for (int i = 0; i < N; i++)
output(ans[i]);
}
# | 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... |