Submission #1051883

#TimeUsernameProblemLanguageResultExecution timeMemory
1051883user736482Parrots (IOI11_parrots)C++17
81 / 100
3 ms1448 KiB
#include<bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" #include "encoder.h" #include "encoderlib.h" using namespace std; //int enc[2137]; void encode(int n,int v[]){ for(int i=0;i<n;i++){ for(int j=0;j<3;j++){ for(int k=0;k<(1<<j);k++){ //cout<<i*8+((v[i]/(1<<j*3))%8)<<" "; //enc[(1<<j)-1+k+i*7]=i*8+((v[i]/(1<<j*3))%8); send(i*8+((v[i]/(1<<j*3))%8)); } } //cout<<"\n"; } }
#include<bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" #include "encoder.h" #include "encoderlib.h" using namespace std; void decode(int n,int l,int v[]){ sort(v,v+l); int pom[8]; for(int i=0;i<8;i++) pom[i]=0; for(int i=0;i<n;i++){ int k=0; for(int j=0;j<7;j++){ pom[v[i*7+j]%8]++; } for(int j=0;j<8;j++){ if(pom[j]>=4){ k+=j; pom[j]-=4; } } for(int j=0;j<8;j++){ if(pom[j]>=2){ k*=8; k+=j; pom[j]-=2; } } for(int j=0;j<8;j++){ if(pom[j]>=1){ k*=8; k+=j; pom[j]-=1; } } output(k); //cout<<k<<" "; } }
#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...