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 A[]) {
for(int i = 0;i<n;i++){
for(int j = 0;j<8;j++){
if((1<<j) & A[i])send((i << 3) + j);
}
}
}
#include "decoder.h"
#include <bits/stdc++.h>
using namespace std;
#include "decoderlib.h"
void decode(int n, int l, int A[]) {
int res[n] = {0};
for(int i = 0;i<l;i++){
int ind = A[i] / 8;
int bit = A[i] % 8;
res[ind] |= (1<<bit);
}
for(int i = 0;i<n;i++)output(res[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... |