# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1007614 | nomuluun | Parrots (IOI11_parrots) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
void send(int a){
}
void output(int b){
}
void encode(int N, int M[]){
for(int i=0; i<N; i++){
if(M[i]==1)send(i);
}
}
void decode(int N, int L, int X[]){
bool b[N+5];
for(int i=0; i<L; i++){
b[X[i]]=1;
}
for(int i=0; i<N; i++){
if(b[i]==1)output(1);
else output(0);
}
}
#include<bits/stdc++.h>
using namespace std;
void send(int a){
}
void output(int b){
}
void encode(int N, int M[]){
for(int i=0; i<N; i++){
if(M[i]==1)send(i);
}
}
void decode(int N, int L, int X[]){
bool b[N+5];
for(int i=0; i<L; i++){
b[X[i]]=1;
}
for(int i=0; i<N; i++){
if(b[i]==1)output(1);
else output(0);
}
}