답안 #564708

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
564708 2022-05-19T13:40:45 Z MrDeboo 질문 (CEOI14_question_grader) C++17
27 / 100
3091 ms 24244 KB
#include <bits/stdc++.h>
using namespace std;
int encode (int n, int x, int y) {
    for(int i=0;i<10;i++){
        if(((1<<i)&x)!=((1<<i)&y)){
            if(((1<<i)&x))return i*2+1;
            return i*2+2;
        }
    }
    return -1;
}
#include <bits/stdc++.h>
using namespace std;
int decode (int n, int q, int h) {
	h--;
	int f=(h%2);
	h/=2;
	return (f^(!!(q&(1<<h))));
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 3070 ms 24192 KB Output is partially correct - maxh = 20
2 Partially correct 3091 ms 24244 KB Output is partially correct - maxh = 20