Submission #7096

# Submission time Handle Problem Language Result Execution time Memory
7096 2014-07-23T14:39:08 Z tncks0121 Question (Grader is different from the original contest) (CEOI14_question_grader) C
0 / 100
1169 ms 25676 KB
int encode (int n, int x, int y) {
  for(int k = 0; k < 9; k++) {
    if(((x >> k) ^ (y >> k)) & 1) {
      int t = (x >> k) & 1;
      return k * 2 + t + 1;
    }
  }
}
int decode (int n, int q, int h) { 
  --h;
  int b = h & 1, k = h >> 1;
  return (((q >> k) & 1) == b);
}

Compilation message

encoder.c: In function 'encode':
encoder.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# Verdict Execution time Memory Grader output
1 Incorrect 1169 ms 25676 KB wrong answer
2 Incorrect 1083 ms 25676 KB wrong answer