제출 #387728

#제출 시각아이디문제언어결과실행 시간메모리
387728Nima_Naderi질문 (CEOI14_question_grader)C++14
0 / 100
2165 ms24396 KiB
#include <bits/stdc++.h>
using namespace std;
int encode (int n, int x, int y) {
    int h = 0, xr = x ^ y;
    for(int i = 0; i < 10; i ++){
        if((xr >> i) & 1LL){
            h = i * 2 + (x & 1LL);
            h ++;
            return h;
        }
    }
    return -1;
}
#include <bits/stdc++.h>
using namespace std;
int decode (int n, int q, int h) {
    h --;
    bool g = h & 1LL; h /= 2;
    return (((q >> h) & 1LL) == g);
}
#Verdict Execution timeMemoryGrader output
Fetching results...