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 Icco at 2009-12-30 00:48:29 on Problem 1094
In Reply To:小样儿,终于把你征服,哈哈。给用拓扑排序的同学一点提示吧 Posted by:TurnAround at 2009-12-29 23:01:34
> WA的晕头转向,终于过了。。哈哈
> 和我一样用拓扑排序WA的同学们一点提示:
> 开始我用《算法导论》里的拓扑排序过程来做的,后来发现拓扑排完确定没有环后,不知道怎么判断是“有序”还是“不确定”。后来用严蔚敏老师的《数据结构》里的拓扑排序过程,只要中间有一次入度为空的队列里的个数超过一个,那么就不会是“有序”的了。当然《算法导论》的拓扑过程可能也是能做的,只是我没理解透,期待大牛的讲解。
时间复杂度不同 O(V+E) 和O(V*E)

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