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.
Unable to solve dp on trees problem on Codechef
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.