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(),表示不解,难道不会出现a-->b,then b-->a,then we can not reach c的情况吗? void dfs(int u){ for(int i=head[u];i!=-1;i=edge[i].next){ if(!edge[i].vis){ edge[i].vis=1; dfs(edge[i].v); } } printf("%d\n",u); } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator