# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
252827 | 2020-07-26T10:24:36 Z | verngutz | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++17 | 0 ms | 0 KB |
int encode(int n, int x, int y) { int least_differing_bit; for(int i = 0; i < N; i++) { if((x & (1 << i)) ^ (y & (1 << i))) { least_differing_bit = i; break; } } int x0 = (x & (1 << least_differing_bit)) == 0; if(least_differing_bit < 8) { return least_differing_bit | (x0 << 3); } else { return (least_differing_bit << 1) | x0; } }