singh1495's blog

By singh1495, history, 8 years ago, In English

can anyone tell me why my code gives tle and hows i can remove this i apply mo algo correctly for this than why this gives me tle http://mirror.codeforces.com/contest/703/submission/19736475 thanx in advance

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
8 years ago, # |
  Vote: I like it +1 Vote: I do not like it

It gives tle because MO's algorithm is not the intended solution for this problem. The number of queries is very large. This problem can be solved using segment trees or BIT.