제출 #1236224

#제출 시각아이디문제언어결과실행 시간메모리
1236224kaiboy질문 (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...