Submission #850307

#TimeUsernameProblemLanguageResultExecution timeMemory
850307borisAngelovParrots (IOI11_parrots)C++17
81 / 100
3 ms1620 KiB
#include "encoder.h" #include "encoderlib.h" #include <bits/stdc++.h> using namespace std; void encode(int n, int m[]) { for (int i = 0; i < n; ++i) { for (int bit = 0; bit < 8; ++bit) { if ((m[i] & (1 << bit)) != 0) { send(i * 8 + bit); } } } }
#include "decoder.h" #include "decoderlib.h" #include <bits/stdc++.h> using namespace std; void decode(int n, int l, int x[]) { int ans[n] = {}; for (int i = 0; i < l; ++i) { int pos = x[i] / 8; int bit = x[i] % 8; ans[pos] += (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...