#include "encoder.h"
#include "encoderlib.h"
void encode(int n, int M[]) {
int i, j;
for (i = 0; i < n; i++) {
int m = M[i];
for (j = 0; j < 8; j++) {
int t = i * 8 + j;
if (m % 2) send(t);
m /= 2;
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#define N 70
int ans[N];
void decode(int n, int L, int X[]) {
int i;
for (i = 0; i < n; i++) ans[i] = 0;
for (i = 0; i < L; i++) {
ans[X[i] / 8] += 1 << X[i] % 8;
}
for (i = 0; i < n; i++) {
output(ans[i]);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
616 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1012 KB |
Output is correct |
2 |
Correct |
1 ms |
952 KB |
Output is correct |
3 |
Correct |
2 ms |
1020 KB |
Output is correct |
4 |
Correct |
3 ms |
1024 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
1000 KB |
Output is correct |
2 |
Correct |
3 ms |
972 KB |
Output is correct |
3 |
Correct |
2 ms |
1012 KB |
Output is correct |
4 |
Correct |
3 ms |
1108 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
1016 KB |
Output is correct |
2 |
Correct |
2 ms |
1016 KB |
Output is correct |
3 |
Correct |
2 ms |
1036 KB |
Output is correct |
4 |
Correct |
3 ms |
1040 KB |
Output is correct |
5 |
Correct |
2 ms |
1172 KB |
Output is correct |
6 |
Correct |
3 ms |
1036 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
2 ms |
1012 KB |
Output is partially correct - P = 8.000000 |
2 |
Partially correct |
3 ms |
1032 KB |
Output is partially correct - P = 8.000000 |
3 |
Incorrect |
0 ms |
488 KB |
Error : Bad encoded integer |
4 |
Incorrect |
0 ms |
488 KB |
Error : Bad encoded integer |
5 |
Incorrect |
0 ms |
488 KB |
Error : Bad encoded integer |
6 |
Incorrect |
0 ms |
496 KB |
Error : Bad encoded integer |
7 |
Incorrect |
0 ms |
496 KB |
Error : Bad encoded integer |