Submission #1236224

#TimeUsernameProblemLanguageResultExecution timeMemory
1236224kaiboyQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++20
27 / 100
705 ms39652 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 timeMemoryGrader output
Fetching results...