Submission #551366

# Submission time Handle Problem Language Result Execution time Memory
551366 2022-04-20T13:58:36 Z AugustinasJucas Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
0 / 100
0 ms 488 KB
int encode(int x, int y, int n) {
	for(int i = 0; i < 10; i++) {
		int sk = (1 << i);
		if((x & sk) != (y & sk)) {
			return i * 2 + ((bool)(x&sk));
		}
	}
	return -1;
}
int decode(int q, int h, int n) {
	// return "yes", jei q = x, return "no", jei q = y
	int vl = h & 1;
	int ind = h / 2;
	if( ((bool)(q & (1 << ind))) == vl) {
		return 1;
	}else {
		return 0;
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 472 KB the encoded value must be greater than or equal to 1
2 Incorrect 0 ms 488 KB the encoded value must be greater than or equal to 1