Help needed in LABYR1 spoj problem

Revision en2, by samurai123, 2017-01-08 18:45:31

I was solving LABYR1 spoj problem LINK and the problem reduced to finding diameter of tree. But when I submitted it is constantly giving WA. Any help will be appreciated. LINK OF MY CODE

Tags #trees, diameter, dfs and similar, help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English samurai123 2017-01-08 18:45:31 1 Tiny change: 'F MY CODE].(http://id' -> 'F MY CODE](http://id'
en1 English samurai123 2017-01-08 16:44:24 291 Initial revision (published)