Submission #35081

# Submission time Handle Problem Language Result Execution time Memory
35081 2017-11-18T01:31:38 Z imaxblue Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
27 / 100
1826 ms 25664 KB
int log(int X){int C=0; while(X>1){C++; X>>=1;} return C;}
int encode(int N, int X, int Y){
  return (log((X^Y)&-(X^Y)) << 1)+((X&(((X^Y)&-(X^Y))))>0)+1;
}
int decode(int N, int Q, int H){
    --H;
  return (H&1)?((Q&(1 << (H/2)))>0):((Q&(1 << (H/2)))==0);
}
# Verdict Execution time Memory Grader output
1 Partially correct 1625 ms 25664 KB Output is partially correct - maxh = 20
2 Partially correct 1826 ms 25664 KB Output is partially correct - maxh = 20