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 rep(i,a,b) for(int i = a; i <= b; i++)
void encode(int n, int m[])
{
rep(i,0,n-1)
{
rep(bit,0,7)
{
if(m[i] & (1 << bit))
{
send(bit + (i << 3));
}
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = a; i <= b; i++)
void decode(int n, int l, int x[])
{
vector<int> ans(n,0);
rep(i,0,l-1)
{
int bit = 0;
if(x[i] & 1) bit += 1;
if(x[i] & 2) bit += 2;
if(x[i] & 4) bit += 4;
int poz = x[i] >> 3;
ans[poz] |= (1 << bit);
}
rep(i,0,n-1) 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... |