# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
567264 | 600Mihnea | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 3302 ms | 24120 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.
bool first = 1;
int what[1 << 12];
int encode (int n, int x, int y) {
if (first) {
int id = 0;
first = 0;
for (int mask = 0; mask < (1 << 12); mask++) {
if (__builtin_popcount(mask) == 6) {
what[id++] = mask;
}
}
}
for (int bit = 0; bit < 12; bit++) {
if (!!(what[x] & (1 << bit)) && !(what[y] & (1 << bit))) {
return bit + 1;
}
}
}
bool first2 = 1;
int what2[1 << 12];
int decode (int n, int q, int h) {
if (first2) {
int id = 0;
first2 = 0;
for (int mask = 0; mask < (1 << 12); mask++) {
if (__builtin_popcount(mask) == 6) {
what2[id++] = mask;
}
}
}
return !!(what2[q] & (1 << (h - 1)));
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |