[Help] Gym Problem 100570F (Centroid Decomposition)

Revision en2, by rachitiitr, 2016-09-19 18:20:13

Hey everyone!
I have just understood the idea of Centroid Decomposition in previous zscoder's contest.
I was doing another problem based on this concept.
Here is my detailed source code
Can someone help me figure out what am I doing wrong. I have checked the integer overflow cases and the code almost seems right. I can't view the test cases of the gym problem.
Thanks.

Tags centroid decomposition, dp on tree

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English rachitiitr 2016-09-19 18:20:13 7 Tiny change: 'est cases either of the gy' -> 'est cases of the gy'
en1 English rachitiitr 2016-09-19 17:04:48 519 Initial revision (published)