Why is this TLE (dp on trees)?

Revision en3, by adityaaaaaaaaaaaaaaa, 2019-06-23 16:47:15

55968842 The question (337D - Book of Evil) is on dp on trees. I cant find out why this code is TLEing. Any help would be appreciated.

Tags #dp, #trees

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English adityaaaaaaaaaaaaaaa 2019-06-23 16:47:15 14
en2 English adityaaaaaaaaaaaaaaa 2019-06-23 16:46:23 19
en1 English adityaaaaaaaaaaaaaaa 2019-06-23 16:45:23 147 Initial revision (published)