Submission #1116525

#TimeUsernameProblemLanguageResultExecution timeMemory
1116525PagodePaivaParrots (IOI11_parrots)C++17
52 / 100
3 ms1468 KiB
#include<bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int n, int M[]){ for(int i = 0;i < n;i++){ for(int j = 0;j < 8;j += 2){ int res = 0; if((1<<j)&M[i]) res += 1; if((1<<(j+1))&M[i]) res += 2; res += 4*i; int d = j/2; res += 64*d; send(res); //cout << res << '\n'; } } return; }
#include<bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" using namespace std; void decode(int n, int L, int X[]){ int res[n]; for(int i = 0;i < n;i++) res[i] = 0; for(int i = 0;i < L;i++){ int d = X[i]; int pos = (d/4)%16; int cf = (d/64); res[pos] += (d%4)*(1<<(2*cf)); } for(int i = 0;i < n;i++){ //cout << res[i] << ' '; output(res[i]); } //cout << '\n'; return; }
#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...