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"
#define n nnnnnnn1
#define a aaaaaaa1
typedef int ll;
ll n;
ll a[105];
void encode(int N, int M[])
{
n = N;
for(ll i = 0; i < n; i++)
{
a[i] = M[i];
}
ll x = 0;
for(ll i = 0; i < n; i++)
{
x += a[i] * (1 << i);
}
send(x);
}
#include "decoder.h"
#include "decoderlib.h"
typedef int ll;
ll n;
ll m;
ll a[10005];
void decode(int N, int L, int X[])
{
n = N;
m = L;
for(ll i = 0; i < m; i++)
{
a[i] = X[i];
}
for(ll i = 0; i < n; i++)
{
if(a[0] & (1 << i)) output(1);
else output(0);
}
}
# | 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... |