#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){
int s = i|(j<<5);
send(s);
}
}
#include <bits/stdc++.h>
#include "decoder.h"
#include "decoderlib.h"
using namespace std;
void decode(int N, int L, int X[]){
vector <int> v(N);
for(int i = 0;i < L;i++) {
int idx = 0;
for (int j = 0;j < 5;j++)
idx |= ((1<<j) & X[i]);
X[i] >>= 5;
v[idx] |= 1<<X[i];
}
for (int i = 0;i < N;i++)
output(v[i]);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
876 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
1520 KB |
Output is correct |
2 |
Correct |
5 ms |
1520 KB |
Output is correct |
3 |
Correct |
5 ms |
1520 KB |
Output is correct |
4 |
Correct |
5 ms |
1520 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
1520 KB |
Output is correct |
2 |
Correct |
5 ms |
1520 KB |
Output is correct |
3 |
Correct |
5 ms |
1520 KB |
Output is correct |
4 |
Correct |
5 ms |
1520 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
1520 KB |
Output is correct |
2 |
Correct |
5 ms |
1520 KB |
Output is correct |
3 |
Correct |
6 ms |
1520 KB |
Output is correct |
4 |
Correct |
7 ms |
1520 KB |
Output is correct |
5 |
Correct |
7 ms |
1520 KB |
Output is correct |
6 |
Correct |
7 ms |
1528 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
5 ms |
1520 KB |
Output is partially correct - P = 8.000000 |
2 |
Partially correct |
7 ms |
1520 KB |
Output is partially correct - P = 8.000000 |
3 |
Incorrect |
6 ms |
1520 KB |
Error : Output is wrong |
4 |
Incorrect |
7 ms |
1776 KB |
Error : Output is wrong |
5 |
Incorrect |
8 ms |
1776 KB |
Error : Output is wrong |
6 |
Incorrect |
8 ms |
1776 KB |
Error : Output is wrong |
7 |
Incorrect |
8 ms |
1776 KB |
Error : Output is wrong |