#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pb(e) push_back(e)
#define sv(a) sort(a.begin(),a.end())
#define sa(a,n) sort(a,a+n)
#define mp(a,b) make_pair(a,b)
#define vf first
#define vs second
#define ar array
#define all(x) x.begin(),x.end()
const int inf = 0x3f3f3f3f;
const int mod = 1000000007;
const double PI=3.14159265358979323846264338327950288419716939937510582097494459230;
bool remender(ll a , ll b){return a%b;}
void encode(int n, int arr[]){
for(int i = 0; i < n; i++){
for(int j = 0; j < 8; j++){
if(((1 << j) & arr[i]) > 0){
send(i * 8 + j);
}
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pb(e) push_back(e)
#define sv(a) sort(a.begin(),a.end())
#define sa(a,n) sort(a,a+n)
#define mp(a,b) make_pair(a,b)
#define vf first
#define vs second
#define ar array
#define all(x) x.begin(),x.end()
const int inf = 0x3f3f3f3f;
const int mod = 1000000007;
const double PI=3.14159265358979323846264338327950288419716939937510582097494459230;
bool remender(ll a , ll b){return a%b;}
void decode(int n, int l, int arr[]){
int ans[n];
memset(ans,0,sizeof ans);
for(int i = 0; i < l; i++){
int pos = arr[i]/8;
int bit = arr[i] % 8;
ans[pos] += (1 << bit);
}
for(int i = 0; i < n; i++)output(ans[i]);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
620 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
1008 KB |
Output is correct |
2 |
Correct |
2 ms |
984 KB |
Output is correct |
3 |
Correct |
2 ms |
992 KB |
Output is correct |
4 |
Correct |
3 ms |
996 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1008 KB |
Output is correct |
2 |
Correct |
1 ms |
1016 KB |
Output is correct |
3 |
Correct |
2 ms |
1048 KB |
Output is correct |
4 |
Correct |
1 ms |
1028 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1016 KB |
Output is correct |
2 |
Correct |
2 ms |
1016 KB |
Output is correct |
3 |
Correct |
2 ms |
1020 KB |
Output is correct |
4 |
Correct |
3 ms |
1044 KB |
Output is correct |
5 |
Correct |
3 ms |
1032 KB |
Output is correct |
6 |
Correct |
3 ms |
1036 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
3 ms |
1028 KB |
Output is partially correct - P = 8.000000 |
2 |
Partially correct |
3 ms |
1036 KB |
Output is partially correct - P = 8.000000 |
3 |
Incorrect |
2 ms |
596 KB |
Error : Bad encoded integer |
4 |
Incorrect |
1 ms |
636 KB |
Error : Bad encoded integer |
5 |
Incorrect |
0 ms |
636 KB |
Error : Bad encoded integer |
6 |
Incorrect |
0 ms |
636 KB |
Error : Bad encoded integer |
7 |
Incorrect |
0 ms |
628 KB |
Error : Bad encoded integer |