Not able to figure out where the array is going out of bounds in sparse table implementation of Round Div2 — 736 D

Правка en1, от levi.ackerman1732, 2021-08-03 15:31:47

Question:1549D - У чисел есть друзья My Solution:124753951

My implementation: get the absolute values of differences between two neighbouring cells and then implement the sparse table to get the queries faster. Now using sliding window technique find the max length of window.

Context: I have pretty much tried to implement the solution given in the editorial. Any insight is highly helpful. Thanks.

Теги #sparse table, sliding window, #gcd

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский levi.ackerman1732 2021-08-03 15:31:47 525 Initial revision (published)