Submission #7098

# Submission time Handle Problem Language Result Execution time Memory
7098 2014-07-23T14:44:43 Z tncks0121 Question (Grader is different from the original contest) (CEOI14_question_grader) C
27 / 100
1622 ms 25676 KB
int encode (int n, int x, int y) {
  int k;
  for(k = 0; k <= 9; k++) {
    if(((x >> k) ^ (y >> k)) & 1) {
      int t = (x >> k) & 1;
      return k * 2 + t + 1;
    }
  }
  return -1;
}
int decode (int n, int q, int h) { 
  --h;
  int b = h & 1, k = h >> 1;
  return (((q >> k) & 1) == b);
}
# Verdict Execution time Memory Grader output
1 Partially correct 1612 ms 25676 KB Output is partially correct - maxh = 20
2 Partially correct 1622 ms 25676 KB Output is partially correct - maxh = 20