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 a[])
{
for (int i = 0; i < n; ++i) { // n:5bit, m:8bit, s:8bit
// j:3bit * 10
for (int j = 0; j < 8; ++j) {
if (a[i]>>j&1) send((i<<3)|j);
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 20;
int ans[N];
void decode(int n, int l, int x[])
{
for (int k = 0; k < l; ++k) {
int i = x[k]>>3;
int j = x[k]&0b111;
ans[i] |= 1<<j;
}
for (int i = 0; i < n; ++i)
output(ans[i]);
}
// g++-13 grader.cpp encoder.cpp decoder.cpp -o par && ./par < grader.in.1
# | 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... |