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