# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
199149 | godwind | Parrots (IOI11_parrots) | C++14 | 11 ms | 1520 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "encoder.h"
#include "encoderlib.h"
using namespace std;
void encode(int n, int M[]) {
for (int i = 0; i < n; ++i) {
int x = i * 16;
send(i * 16 + 4 * 0 + M[i] % 4);
send(i * 16 + 4 * 1 + (M[i] >> 2) % 4);
send(i * 16 + 4 * 2 + (M[i] >> 4) % 4);
send(i * 16 + 4 * 3 + (M[i] >> 6) % 4);
}
}
#include "decoder.h"
#include "decoderlib.h"
using namespace std;
int ans[1000];
void decode(int n, int L, int X[]) {
for (int i = 0; i < n; ++i) {
ans[i] = 0;
}
for (int i = 0; i < L; ++i) {
int id = X[i] >> 4;
int r = (X[i] >> 2) % 4;
ans[id] += (1 << (2 * r)) * (X[i] % 4);
}
for (int i = 0; i < n; ++i) {
output(ans[i]);
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |