#include "encoder.h"
#include "encoderlib.h"
void encode(int n, int m[]){
for(int i = 0; i < n; i++){
for(int j = 0; j < 8; j++){
if(m[i] & (1 << j)) send((i << 3) + j);
}
}
}
#include "decoder.h"
#include "decoderlib.h"
void decode(int n, int l, int x[]){
int m[n];
for(int i = 0; i < n; i++){
m[i] = 0;
}
for(int i = 0; i < l; i++){
m[(x[i] & 248) >> 3] |= (1 << (x[i] & 7));
}
for(int i = 0; i < n; i++){
output(m[i]);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
640 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1028 KB |
Output is correct |
2 |
Correct |
1 ms |
1036 KB |
Output is correct |
3 |
Correct |
1 ms |
1036 KB |
Output is correct |
4 |
Correct |
2 ms |
1048 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1036 KB |
Output is correct |
2 |
Correct |
2 ms |
1004 KB |
Output is correct |
3 |
Correct |
2 ms |
988 KB |
Output is correct |
4 |
Correct |
1 ms |
1040 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
908 KB |
Output is correct |
2 |
Correct |
2 ms |
1000 KB |
Output is correct |
3 |
Correct |
2 ms |
1056 KB |
Output is correct |
4 |
Correct |
3 ms |
1056 KB |
Output is correct |
5 |
Correct |
3 ms |
1136 KB |
Output is correct |
6 |
Correct |
3 ms |
1068 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
2 ms |
1036 KB |
Output is partially correct - P = 8.000000 |
2 |
Partially correct |
3 ms |
1052 KB |
Output is partially correct - P = 8.000000 |
3 |
Incorrect |
0 ms |
512 KB |
Error : Bad encoded integer |
4 |
Incorrect |
0 ms |
520 KB |
Error : Bad encoded integer |
5 |
Incorrect |
0 ms |
520 KB |
Error : Bad encoded integer |
6 |
Incorrect |
0 ms |
520 KB |
Error : Bad encoded integer |
7 |
Incorrect |
0 ms |
512 KB |
Error : Bad encoded integer |