제출 #625918

#제출 시각아이디문제언어결과실행 시간메모리
625918paliloQuestion (Grader is different from the original contest) (CEOI14_question_grader)C++17
27 / 100
4393 ms24260 KiB
auto encode(int n, int x, int y) -> int {
    const auto z = x ^ y;
    for (int i = 0;; ++i) {
        if (z >> i & 1) {
            return (i << 1 | (y >> i & 1)) + 1;
        }
    }
}
auto decode(int n, int q, int h) -> int {
    --h;
    return (q >> (h >> 1) ^ h) & 1;
}
#Verdict Execution timeMemoryGrader output
Fetching results...