# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1236224 | kaiboy | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++20 | 705 ms | 39652 KiB |
int encode(int n, int a, int b) {
int h = 0;
while ((a >> h & 1) == (b >> h & 1))
h++;
return (h << 1 ^ a >> h & 1) + 1;
}
bool decode(int n, int c, int x) {
x--;
int h = x >> 1, d = x & 1;
return (c >> h & 1) == d;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |