Codercell's blog

By Codercell, history, 7 years ago, In English

I was recently solving dp on tree type problems and i came across this.

Problem

do you think the solution given in editorial is correct.I feel it doesnt include all the cases.He says for every vertex as root , consider all subtrees...This doesnt include all the possible Sets S. Please someone explain this to me

Thanks in advance

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

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

Can someone elaborate the centroid decomposition idea for this question.?