Submission #1133282

#TimeUsernameProblemLanguageResultExecution timeMemory
1133282StefanSebezParrots (IOI11_parrots)C++20
81 / 100
2 ms840 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" using namespace std; #define pb push_back void encode(int n, int a[]){ vector<int>b; for(int i=0;i<n;i++){ for(int j=7;j>=0;j--) b.pb((a[i]>>j)&1); } //for(auto i:b) printf("%i",i);printf("\n"); for(int i=0;i<b.size();i++){ if(b[i]==1){ send(i); } } }
#include <bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" using namespace std; void decode(int n, int m, int a[]){ vector<int>b(n*8); for(int i=0;i<m;i++){ b[a[i]]=1; } //for(auto i:b) printf("%i",i);printf("\n"); for(int i=0;i<8*n;i+=8){ int x=0; for(int j=i+7,e=1;j>=i;j--,e<<=1){ x+=e*b[j]; } //printf("%i ",x); output(x); } //printf("\n"); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...