PyPy3 Oddity: Useless Statement Solves Runtime Error

Правка en1, от YMSeah, 2021-08-12 13:47:53

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?

Теги pypy3

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский YMSeah 2021-08-12 13:47:53 640 Initial revision (published)