Submission #7097

# Submission time Handle Problem Language Result Execution time Memory
7097 2014-07-23T14:39:26 Z tncks0121 Question (Grader is different from the original contest) (CEOI14_question_grader) C
0 / 100
1139 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;
    }
  }
}
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:9:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# Verdict Execution time Memory Grader output
1 Incorrect 1139 ms 25676 KB wrong answer
2 Incorrect 1079 ms 25676 KB wrong answer