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

是不是可以模拟拓扑排序?

Posted by xuguangshengqq at 2007-07-20 20:31:33 on Problem 3275
如果某个节点比另一个节点小,那么它的入度就加1
每次当只有一个入度为0时,把它取出。
如果有n个节点同时为0度,那么就添加 n*(n-1)/2条边 也即 多比较n*(n-1)/2次
是不是这样啊,请多多指教啊!哈哈!

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