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;
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define REP(n) FOR(O, 1, (n))
#define pb push_back
#define f first
#define s second
void encode(int N, int M[])
{
FOR(i, 0, N-1) {
int a = i<<3;
FOR(j, 0, 7) {
if (M[i] & (1<<j)) {
int b = a + j;
//cout << " i = " << i << " a = " <<a << " j = " << j << " b = " << b << endl;
send(b);
}
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define REP(n) FOR(O, 1, (n))
#define pb push_back
#define f first
#define s second
void decode(int N, int L, int X[])
{
vector<int> rez(N, 0);
FOR(i, 0, L-1) {
int b = X[i];
int j = b%8;
int a = b>>3;
rez[a] += 1<<j;
}
for (int x : rez) output(x);
}
# | 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... |