# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
774282 | alexander707070 | 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>
#include "grader.h"
#define MAXN 300007
using namespace std;
int n,pos,res;
vector<int> bruh;
/*
void send(int x){
bruh.push_back(x);
}
*/
void encode(int N,int M[]){
n=N;
for(int i=0;i<n;i++){
for(int f=0;f<8;f++){
send(pos*2+M[i]%2);
M[i]/=2; pos++;
}
}
}
void decode(int N,int L,int X[]){
n=N;
sort(X,X+L);
for(int i=0;i<n;i++){
res=0;
for(int f=7;f>=0;f--){
res*=2; res+=X[i*8+f]%2;
}
output(res);
}
}
/*
int main(){
encode(8,{37,33,153,201,135,135,87,134});
random_shuffle(bruh.begin(),bruh.end());
decode(8,bruh.size(),bruh);
}
*/