# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
552819 | Aldas25 | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 3058 ms | 24184 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.
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
int firstBit (int x) {
FOR(i, 0, 15)
if (x & (1<<i))
return i;
return -1;
}
int encode (int n, int x, int y) {
int b = firstBit(x ^ y);
b++;
//f (b == -1) exit(1);
int code = b<<1;
if (x & (1<<(b-1))) code++;
return code;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |