제출 #26798

#제출 시각아이디문제언어결과실행 시간메모리
26798baactree질문 (CEOI14_question_grader)C++14
27 / 100
1922 ms25672 KiB
int encode (int n, int x, int y) {
    for(int i=0;i<10;i++){
        int a=x&1;
        int b=y&1;
        if(a!=b){
            return i*2+a+1;
        }
        x/=2;
        y/=2;
    }
    return 0;
}
int decode (int n, int q, int h) {
    h--;
    int k=h&1;
    h/=2;
    while(h--)
        q/=2;
    return (q&1)==k;
}
#Verdict Execution timeMemoryGrader output
Fetching results...