# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
596005 | snasibov05 | Parrots (IOI11_parrots) | C++14 | 13 ms | 1356 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"
void encode(int n, int m[]){
const int nn = 32;
int mx = 8;
for (int i = 0; i < n; ++i){
for (int j = 0; j < mx; ++j){
if (1 << j & m[i]) {
if (i < nn) send(j * nn + i);
else {
send(j * nn + (i - nn));
send(j * nn + (i - nn));
}
}
}
}
}
#include "decoder.h"
#include "decoderlib.h"
#include "bits/stdc++.h"
using namespace std;
void decode(int n, int l, int x[]){
const int nn = 32;
map<int, int> cnt;
for (int i = 0; i < l; ++i) cnt[x[i]]++;
vector<int> v(n);
for (auto [cur, c] : cnt){
if (c == 1 || c == 3) v[cur % nn] += (1 << (cur / nn));
if (c == 2 || c == 3) v[cur % nn + nn] += (1 << (cur / nn));
}
for (int i = 0; i < n; ++i) output(v[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... |