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:我是O(N)做的,一次DFS就可以了

Posted by xiaomi at 2004-05-24 00:36:09 on Problem 1655
In Reply To:Re:我是O(N)做的,一次DFS就可以了 Posted by:daofeng at 2004-05-22 22:29:58
没有啊,在回溯的时候修改一个点的子节点总数D[i]
B[i]=max(D[child(i)], n-D[i]-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