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