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 lenohoo at 2012-06-07 16:15:39 on Problem 2230
网上看了别人的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:
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