terserah's blog

By terserah, history, 9 years ago, In English

Hello, i am struggling to solve this problem from SPOJ. Can anybody give me some hints? Thanks in advance!

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

»
9 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

You could change the problem by preprocessing the tree and answering how many nodes in a subtree have a tag  ≤  k