Data Structure Problem: UVA 12998 Tree Weights

Revision en1, by Tobby_And_Friends, 2017-03-29 00:50:58

Link: https://uva.onlinejudge.org/external/129/12998.pdf

I was thinking of solving using euler tour technique (link: http://ideone.com/OEoGL2) but I'm not getting how to update the nodes correctly. Any hints on how to solve this problem will be really appreciated. Thanks in advance.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Tobby_And_Friends 2017-03-29 00:50:58 332 Initial revision (published)