asqre756's blog

By asqre756, history, 3 years ago, In English

I am trying to implement KQUERY from spoj using persistent segment tree CodeLink but getting WA.

Please Help!

Full text and comments »

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

By asqre756, history, 3 years ago, In English

I am unable to figure out my mistake in the implementation of https://codeforces.net/contest/343/submission/121547727

used Euler tour technique and segment trees for query 1: I have used lazy propagation to update all the nodes and also checked if any node in the subtree of the node is empty then made the parent of node empty for query 2: I have updated the node and made it empty for query 3: I have checked if all the nodes in subtree of a given node are filled then printed 1 else 2

but can't figure out my mistake getting WA on tc 6

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it