roottwo's blog

By roottwo, history, 4 years ago, In English

My submission got a wrong answer on test 19 for 1709D: Rorororobot, and I'm having trouble debugging it. My algorithm should be the same as the one described in the editorial. This was my first time implementing a sparse table, though, so there might be something wrong there.

  • Vote: I like it
  • +3
  • Vote: I do not like it

| Write comment?
»
4 years ago, hide # |
← Rev. 2  
Vote: I like it +1 Vote: I do not like it
 int i = log2(r - l + 1) - 0.5;

Why are you subtracting 0.5 here?