# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
386933 | godwind | Parrots (IOI11_parrots) | C++14 | 3 ms | 1340 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"
#include <vector>
using namespace std;
void encode(int n, int M[])
{
vector<int> is(n);
for (int i = 0; i < n; ++i) {
int FIRST = M[i] / 16;
int SECOND = M[i] % 16;
send(FIRST * 16 + i);
send(SECOND * 16 + i);
if (FIRST < SECOND) {
is[i] = false;
} else {
is[i] = true;
}
}
int mask = 0;
for (int i = 0; i < n; ++i) {
if (is[i]) {
mask += (1 << i);
}
}
for (int it = 0; it < 10; ++it) {
send(mask);
# | 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... |