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 zhangfq at 2008-05-13 23:03:15 on Problem 1655
In Reply To:Re:我是O(N)做的,一次DFS就可以了 Posted by:xiaomi at 2004-05-24 00:36:09
> 没有啊,在回溯的时候修改一个点的子节点总数D[i]
> B[i]=max(D[child(i)], n-D[i]-1)
我也是这样的啊~但是TLE啊...是不是数据结构方面有什么要注意的啊

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