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 gzw_02 at 2008-11-14 14:16:38 on Problem 3660 and last updated at 2008-11-14 14:23:34
方法一:分两次对每个点DFS,边分别取正取反。 复杂度是 O(n*(n+e))
方法二:正反两次拓扑排序,每个点维护一个数组bool[n],如果最终有n-1个位置为true,则该点排名唯一确定的。

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