Help in Spoj- QTREE .Getting WA

Revision en1, by kishore_p, 2018-09-15 17:07:29

Solving This problem using Heavy-light Decomposition after reading from this blog. Tried all cases from spoj tool kit it works fine but still getting wrong answer. I have written a neat code. Please help

Tags heavy-light, #spoj, qtree, #trees

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English kishore_p 2018-09-15 17:07:29 364 Initial revision (published)