[PTC] 201206B Tree Balance 動態規劃
Problem BTree BalanceInput le: testdata.inTime limit: 1 secondsProblem DescriptionWe have n nodes, each of them has its node number i and weight wi for thei-th node. We want to construct a binary tree by these nodes such that thesequence of node numbers of in-order traversal is ...