#include <bits/stdc++.h>
#include "encoder.h"
#include "encoderlib.h"
using namespace std;
void encode(int x, int m[]){
for(int i = 0;i<x;i++){
for(int j = 0;j<8;j++){
if((1 << j) & m[i]) {
send((i << 3) + j);
}
}
}
}
#include <bits/stdc++.h>
#include "decoder.h"
#include "decoderlib.h"
using namespace std;
void decode(int x,int l,int m[]){
vector<int> ans(x,0);
for(int i = 0;i<l;i++){
int zahl = m[i]/8;
int bit = m[i] % 8;
ans[zahl] |= (1 << bit);
}
for(int i = 0;i<x;i++){
output(ans[i]);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
648 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
1036 KB |
Output is correct |
2 |
Correct |
2 ms |
1040 KB |
Output is correct |
3 |
Correct |
2 ms |
1032 KB |
Output is correct |
4 |
Correct |
2 ms |
1016 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
1028 KB |
Output is correct |
2 |
Correct |
2 ms |
1032 KB |
Output is correct |
3 |
Correct |
2 ms |
1032 KB |
Output is correct |
4 |
Correct |
2 ms |
1036 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
1036 KB |
Output is correct |
2 |
Correct |
2 ms |
1036 KB |
Output is correct |
3 |
Correct |
2 ms |
1048 KB |
Output is correct |
4 |
Correct |
3 ms |
1056 KB |
Output is correct |
5 |
Correct |
3 ms |
1064 KB |
Output is correct |
6 |
Correct |
3 ms |
1060 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 |
1060 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 |
512 KB |
Error : Bad encoded integer |
6 |
Incorrect |
0 ms |
640 KB |
Error : Bad encoded integer |
7 |
Incorrect |
1 ms |
524 KB |
Error : Bad encoded integer |