#include "encoder.h"
#include "encoderlib.h"
typedef int ll;
void encode(int N, int M[]) {
ll a = 0;
ll i;
for (i = 0; i < N; i++) {
a *= 2;
a += M[i];
}
send(a);
}
#include "decoder.h"
#include "decoderlib.h"
typedef int ll;
void decode(int N, int L, int X[]) {
ll i;
for (i = 0; i < N; i++) {
output(ll(bool(X[0] & (1 << (N - i - 1)))));
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
624 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
872 KB |
Error : Output is wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
496 KB |
Error : Bad encoded integer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
496 KB |
Error : Bad encoded integer |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
492 KB |
Error : Bad encoded integer |
2 |
Incorrect |
0 ms |
496 KB |
Error : Bad encoded integer |
3 |
Incorrect |
0 ms |
488 KB |
Error : Bad encoded integer |
4 |
Incorrect |
1 ms |
496 KB |
Error : Bad encoded integer |
5 |
Incorrect |
0 ms |
496 KB |
Error : Bad encoded integer |
6 |
Incorrect |
0 ms |
496 KB |
Error : Bad encoded integer |
7 |
Incorrect |
0 ms |
488 KB |
Error : Bad encoded integer |