Submission #711391

#TimeUsernameProblemLanguageResultExecution timeMemory
711391mseebacherParrots (IOI11_parrots)C++17
34 / 100
1 ms1040 KiB
#include <bits/stdc++.h> #include "encoder.h" #include "encoderlib.h" using namespace std; void encode(int x, int m[]){ for(int i = 0;i<x;i++){ int y = m[i]; for(int j = 0;j<8;j++){ if((1<<j)&i) y |= (1 << (8+j)); } send(y); } }
#include <bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" using namespace std; void decode(int x,int l,int m[]){ vector<int> ans(x); for(int i = 0;i<x;i++){ int index = 0; for(int j = 8;j<=16;j++){ if(m[i] & 1 << (j)){ m[i] -= (1 << j); index += (1 << (j-8)); } } ans[index] = m[i]; } for(int i = 0;i<x;i++){ output(ans[i]); } }
#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...