Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:这道题应该是要用递归来算吧???In Reply To:Re:这道题应该是要用递归来算吧??? Posted by:clockwise at 2006-09-05 22:00:57 > > 可以的。 > > nodes(bst): 树的节点个数。 > x(bst) : 表示我们要求的答案。 > C(m, n): 组合数。 > > x(bst) = x(bst->leftChild) * x(bst->rightChild) * C(nodes(bst) -1, nodes(bst->leftChild)) > x(empty tree) = 1 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator