YMSeah's blog

By YMSeah, history, 3 years ago, In English

I attempted problem B from the recent #737 (Div 2) contest and had a runtime error. I prevented that error by adding a useless line of code "j == -1":

RE submission: 125632647, AC submission: 125632637

For some context, my code performs a binary search (using a method similar to binary lifting) to find j in the increasing array b where b[j] == a[i]. Since b is the sorted copy of a, a[i] always exists in b so j != -1.

Is this a problem associated with PyPy3's JIT compiler, or am I missing something?

  • Vote: I like it
  • 0
  • Vote: I do not like it