Strange RTE in spoj EAGLE1

Revision en1, by kingofnumbers, 2015-07-09 13:46:45

hello guys

I was trying to solve problem EAGLE1 in spoj OJ

the problem gives you a weighted tree and ask you for each node , find farthest node from it

this is very standard dp problem but my code strangely always take runtime error , although I tried different coding styles.

I thought maybe there's something wrong with test cases but I tried to write code that check the validity of test case before processing it but it showed that nothing wrong with the test cases

I'm seeking for help to explain what's happening , here's my code

thank you in advance


  Rev. Lang. By When Δ Comment
en1 English kingofnumbers 2015-07-09 13:46:45 674 Initial revision (published)