|
|
back to boardWA at #1 ?? Try this data... 6 4 1 2 20 2 5 100 2 3 20 6 3 70 4 1 10 by the way : before you use the dynamic programming on the tree structure, be sure you have build the tree correctly. That's why I got WA. Source Code is available at : ecnu_zp@yahoo.cn Re: WA at #1 ?? Try this data... Many Thanks! Re: WA at #1 ?? Try this data... I guess this test is incorrect, because of statement: " any biparous branch splits up to exactly two new branches", but node 3 has only one branch. Re: WA at #1 ?? Try this data... As I can see here is 2 possible trees. 1 and 3 can be root 6 \ 5 3 \ / 4 2 \ / 1 4 \ 5 1 \ / 6 2 \ / 3 Edited by author 20.12.2015 15:47 Re: WA at #1 ?? Try this data... wrong test case, there will always be zero or two children of any node. Re: WA at #1 ?? Try this data... Thank you for your data |
|
|