Submission #564437

# Submission time Handle Problem Language Result Execution time Memory
564437 2022-05-19T08:33:54 Z shrimb Question (Grader is different from the original contest) (CEOI14_question_grader) C++17
0 / 100
3105 ms 24180 KB
int encode (int n, int x, int y) {
  int dif = x ^ y;
  int id = 0;
  while (!(dif & 1)) dif >>= 1, id++;
  if (y & (1 << id)) id |= (1 << 4);
  return id + 1;
}
int decode (int n, int q, int h) {
	h--;
	bool flip = h & (1 << 4);
	h &= ~(1 << 4);
	if (q & (1 << h)) return 1^flip;
	else return 0^flip;
}
# Verdict Execution time Memory Grader output
1 Incorrect 3105 ms 24172 KB Output isn't correct - maxh = 26
2 Incorrect 3015 ms 24180 KB Output isn't correct - maxh = 26