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 xichuanglian at 2008-10-11 22:29:42 on Problem 3275 and last updated at 2008-10-11 22:32:08
In Reply To:是不是可以模拟拓扑排序? Posted by:xuguangshengqq at 2007-07-20 20:31:33
> 如果某个节点比另一个节点小,那么它的入度就加1
> 每次当只有一个入度为0时,把它取出。
> 如果有n个节点同时为0度,那么就添加 n*(n-1)/2条边 也即 多比较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