| ||||||||||
| 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 | |||||||||
Re:我来辩解一下,呵呵In Reply To:我来辩解一下,呵呵 Posted by:qingshuang100 at 2005-09-02 13:19:23 > 用DFS但不进行顶点标号了,在如果无圈则在回溯时记录点对可达性,例如: > > V0 -> V1 -> V2 -> V3 -> V4 -> V5 -> V6 -> V7 > | ^ > |(V2到V8) |(V10到V4) > V8 -> V9 -> V10 > > 那么在第一支路:V0,V1,V2,V3,V4,V5,V6,V7,记录234567之间的可达性,012之间的可达性,以及012与34567的可达性. > 第二支路:V0,V1,V2,V8,V9,V10,V4,V5,V6,V7,记录V8,V9,V10与V4的可达性,(邻接矩阵存储,同时可以记录V8,V9,V10与V5,V6,V7的可达性),在记录V0,V1,V2与V8,V9,V10的可达性. > > 有圈时仍用并查集. > 不知这样可否? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator