# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
896489 |
2024-01-01T14:39:44 Z |
anton |
Parrots (IOI11_parrots) |
C++17 |
|
8 ms |
1388 KB |
#include "encoder.h"
#include "encoderlib.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
void encode(int N, int M[])
{
int id = 0;
for(int i=0; i<N; i++){
for(int j = 0; j<8; j+=2){
int oc = (M[i] & (3<<j))>>j;
for(int k = 0; k<oc; k++){
send(id);
}
id++;
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include<bits/stdc++.h>
using namespace std;
void decode(int N, int L, int X[])
{
////cout<<"L "<<L<<endl;
vector<int> v(L);
for(int i = 0; i<L; i++){
v[i] = X[i];
}
sort(v.begin(), v.end());
reverse(v.begin(), v.end());
vector<int> res(N);
for(int pos = 0; pos<N*4; pos++){
int oc= 0;
while(v.size()>0 && v.back() == pos){
oc++;
v.pop_back();
}
//cout<<bitset<8>(oc<<((2*pos)%8));
res[pos/4] ^= (oc<<((2*pos)%8));
}
for(auto e: res){
output(e);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
788 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
820 KB |
Error : Encoded message too long |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
788 KB |
Error : Encoded message too long |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
784 KB |
Error : Encoded message too long |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
2 ms |
1328 KB |
Output is partially correct - P = 12.000000 |
2 |
Partially correct |
3 ms |
1344 KB |
Output is partially correct - P = 12.000000 |
3 |
Partially correct |
4 ms |
1344 KB |
Output is partially correct - P = 12.000000 |
4 |
Partially correct |
6 ms |
1376 KB |
Output is partially correct - P = 12.000000 |
5 |
Partially correct |
6 ms |
1384 KB |
Output is partially correct - P = 12.000000 |
6 |
Partially correct |
8 ms |
1388 KB |
Output is partially correct - P = 12.000000 |
7 |
Partially correct |
7 ms |
1388 KB |
Output is partially correct - P = 12.000000 |