# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
960321 |
2024-04-10T09:09:29 Z |
LCJLY |
Parrots (IOI11_parrots) |
C++14 |
|
3 ms |
1372 KB |
#include "encoder.h"
#include "encoderlib.h"
#include <bits/stdc++.h>
using namespace std;
#define show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << " " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << " " << j << " " << #i << " " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<long long,int>pii;
//encoder
void encode(int n, int m[]){
for(int x=0;x<n;x++){
int index=x;
for(int y=0;y<8;y++){
if(m[x]&(1<<y)){
int hold=(index<<3)+y;
send(hold);
}
}
}
}
//encoder
#include "decoder.h"
#include "decoderlib.h"
#include <bits/stdc++.h>
using namespace std;
#define show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << " " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << " " << j << " " << #i << " " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<long long,int>pii;
//decoder
void decode(int n, int l, int arr[]){
int ans[n];
memset(ans,0,sizeof(ans));
for(int x=0;x<l;x++){
int index=arr[x]>>3;
int bit=arr[x]%(1<<3);
ans[index]+=1<<bit;
}
for(int x=0;x<n;x++) output(ans[x]);
}
//decoder
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1316 KB |
Output is correct |
2 |
Correct |
1 ms |
1308 KB |
Output is correct |
3 |
Correct |
2 ms |
1308 KB |
Output is correct |
4 |
Correct |
2 ms |
1320 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
1300 KB |
Output is correct |
2 |
Correct |
1 ms |
1308 KB |
Output is correct |
3 |
Correct |
1 ms |
1312 KB |
Output is correct |
4 |
Correct |
1 ms |
1320 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1308 KB |
Output is correct |
2 |
Correct |
1 ms |
1312 KB |
Output is correct |
3 |
Correct |
2 ms |
1316 KB |
Output is correct |
4 |
Correct |
2 ms |
1324 KB |
Output is correct |
5 |
Correct |
3 ms |
1372 KB |
Output is correct |
6 |
Correct |
3 ms |
1336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
2 ms |
1324 KB |
Output is partially correct - P = 8.000000 |
2 |
Partially correct |
3 ms |
1336 KB |
Output is partially correct - P = 8.000000 |
3 |
Incorrect |
1 ms |
1196 KB |
Error : Bad encoded integer |
4 |
Halted |
0 ms |
0 KB |
- |