Submission #232049

#TimeUsernameProblemLanguageResultExecution timeMemory
232049luciocfParrots (IOI11_parrots)C++14
81 / 100
13 ms1792 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 b = 0; b < 8; b++) if (M[i]&(1<<b)) send(i + (b<<5)); }
#include <bits/stdc++.h> #include "decoder.h" #include "decoderlib.h" using namespace std; static int ans[65]; void decode(int N, int L, int X[]) { memset(ans, 0, sizeof ans); for (int i = 0; i < L; i++) { int ind = 0; for (int b = 0; b < 5; b++) if (X[i]&(1<<b)) ind += (1<<b); int bit = 0; for (int b = 5; b < 8; b++) if (X[i]&(1<<b)) bit += (1<<(b-5)); ans[ind] += (1<<bit); } for (int i = 0; i < N; 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...