Number of distinct elements in a range in an array(solving online)

Правка en1, от Code_sprinter, 2020-06-11 07:47:22

hello everyone,

Recently i came across this problem http://www.spoj.com/problems/DQUERY/en/. I solved the problem using Mo's algo and BST which is basically offline solution. Is there a way I can solve for each query online? If yes, please help me out.

Thanks in advance!!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Code_sprinter 2020-06-11 07:49:33 91
en1 Английский Code_sprinter 2020-06-11 07:47:22 344 Initial revision (published)