# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
260225 | islingr | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 2 ms | 384 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.
int encode(int n, int x, int y) {
int h[924];
for (int S = 0, c = 0; c != 924; ++S)
if (__builtin_popcount(S) == 6)
h[c++] = S;
x = h[x]; y = h[x];
for (int i = 0; i < 12; ++i)
for (int j = 0; j < 12; ++j)
if ((x & 1 << i) && (~y & 1 << j))
return i + 1;
}
int decode(int n, int q, int k) {
int h[924];
for (int S = 0, c = 0; c != 924; ++S)
if (__builtin_popcount(S) == 6)
h[c++] = S;
q = h[q];
return q >> --k & 1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |