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"
#include <bits/stdc++.h>
using namespace std;
void encode(int n, int m[])
{
for (int i = 0; i < n; ++i)
{
for (int bit = 0; bit < 8; ++bit)
{
if ((m[i] & (1 << bit)) != 0)
{
send(i * 8 + bit);
}
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
void decode(int n, int l, int x[])
{
int ans[n] = {};
for (int i = 0; i < l; ++i)
{
int pos = x[i] / 8;
int bit = x[i] % 8;
ans[pos] += (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... |