Zahra.n's blog

By Zahra.n, history, 10 years ago, In English

Hello. I need help for solving problem dquery. pls help me. thanks.

  • Vote: I like it
  • -5
  • Vote: I do not like it

»
10 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Well, the fastest algorithm i know has O((n + m) * Log(n)) complexity and requires persistent seg-tree. I can share it if u need, just let me know

»
10 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

I think this problem can solve ofline and online
Ofline=Mo's algorithm or Segment tree
Online=SqrtDecomposition and Bitset (I didn't write online solution's code but I think it is possible)