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 <algorithm>
#include <iostream>
#include <vector>
#include <cstdint>
#include <cstdlib>
#include <cassert>
#include <queue>
#include <unordered_map>
#define PARROTS
#ifndef PARROTS_MAIN
#include "encoder.h"
#include "encoderlib.h"
#endif
template<typename T>
using Vec = std::vector<T>;
void encode(int N, int* message) {
for (int i = 0; i < N; ++i) {
send(message[i] | (i<<16));
}
}
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstdint>
#include <cstdlib>
#include <cassert>
#include <queue>
#include <unordered_map>
#ifndef PARROTS_MAIN
#include "decoder.h"
#include "decoderlib.h"
#endif
#ifndef PARROTS
template<typename T>
using Vec = std::vector<T>;
#endif
void decode(int N, int L, int* X) {
Vec<int> decoded(N);
for (int i = 0; i < N; ++i) {
int index = (X[i] >> 16);
int value = (X[i] & 255);
decoded[index] = value;
}
for (auto num : decoded) {
output(num);
}
}
# | 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... |