Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:这道题应该是要用递归来算吧???

Posted by 547880119 at 2010-04-09 16:36:17 on Problem 2775
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator