Unable to solve dp on trees problem on Codechef

Revision en1, by arun_prasad, 2016-09-28 13:25:02

I was trying to solve this problem on Codechef . Click Here

After spending a couple of hours on this I could not come up with any dp relation .

Can someone please provide a dp recurrence for this problem and help me solve it ?

Thanks in advance.

Tags help needed, dp on tree, codechef, unable to understand

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English arun_prasad 2016-09-28 13:25:02 355 Initial revision (published)