A data structure for maximizing and asking sum of a segment

Правка en2, от Shayan.P, 2018-06-19 19:05:39

Hello every one... I need a data structure handling two type of queries. 1. Maximize(l,r,x) 2. Sum(l,r)

I have a O(sqrt(n)*log(n)) solution using sqrt decomposition + set.But I am looking for a better solution. Thanks in advance

Теги #data structure

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Shayan.P 2018-06-19 19:05:39 8
en1 Английский Shayan.P 2018-06-19 19:04:22 290 Initial revision (published)