Counting on Tree Problem

Revision en1, by Codercell, 2017-02-22 16:04:14

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

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Codercell 2017-02-22 16:04:14 445 Initial revision (published)