Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
两种方法方法一:分两次对每个点DFS,边分别取正取反。 复杂度是 O(n*(n+e)) 方法二:正反两次拓扑排序,每个点维护一个数组bool[n],如果最终有n-1个位置为true,则该点排名唯一确定的。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator