#include <bits/stdc++.h>
#include "encoder.h"
#include "encoderlib.h"
using namespace std;
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 * 8 + j);
}
}
}
}
#include <bits/stdc++.h>
#include "decoder.h"
#include "decoderlib.h"
using namespace std;
void decode(int N, int L, int X[]) {
vector <int> answer(N, 0);
for(int i = 0; i < L; i++) {
answer[X[i] / 8] |= (1<<(X[i] % 8));
}
for(auto M : answer) {
output(M);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
704 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
1032 KB |
Output is correct |
2 |
Correct |
3 ms |
1040 KB |
Output is correct |
3 |
Correct |
3 ms |
996 KB |
Output is correct |
4 |
Correct |
4 ms |
1040 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1044 KB |
Output is correct |
2 |
Correct |
2 ms |
1036 KB |
Output is correct |
3 |
Correct |
3 ms |
1036 KB |
Output is correct |
4 |
Correct |
3 ms |
1040 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
1028 KB |
Output is correct |
2 |
Correct |
3 ms |
1040 KB |
Output is correct |
3 |
Correct |
3 ms |
1044 KB |
Output is correct |
4 |
Correct |
5 ms |
1028 KB |
Output is correct |
5 |
Correct |
4 ms |
1040 KB |
Output is correct |
6 |
Correct |
3 ms |
1072 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
2 ms |
1048 KB |
Output is partially correct - P = 8.000000 |
2 |
Partially correct |
4 ms |
1032 KB |
Output is partially correct - P = 8.000000 |
3 |
Incorrect |
2 ms |
620 KB |
Error : Bad encoded integer |
4 |
Incorrect |
2 ms |
652 KB |
Error : Bad encoded integer |
5 |
Incorrect |
1 ms |
660 KB |
Error : Bad encoded integer |
6 |
Incorrect |
2 ms |
652 KB |
Error : Bad encoded integer |
7 |
Incorrect |
1 ms |
664 KB |
Error : Bad encoded integer |