# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
451546 | kingfran1907 | 질문 (CEOI14_question_grader) | C++14 | 4242 ms | 24196 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) {
for (int i = 0; i < 20; i++) {
if ((x & (1 << i)) != (y & (1 << i))) {
if (x & (1 << i)) return 2 * i + 2;
else return 2 * i + 1;
}
}
}
int decode (int n, int q, int h) {
h -= 1;
int dig = h / 2;
int ac = h % 2;
if ((q & (1 << dig)) == (ac << dig)) return 1;
else return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |