Help with cses 1664

Правка en2, от BD_SM, 2019-08-16 15:42:36

https://cses.fi/problemset/task/1664 need help on how to solve this problem? I am storing for each i the closest time when a picture finishes if we start at i. This preprocess is O(n) but query worst case is o(n).help pls!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский BD_SM 2019-08-16 15:42:36 168 (published)
en1 Английский BD_SM 2019-08-16 00:15:52 96 Initial revision (published)