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:DFSIn Reply To:DFS Posted by:Sempr at 2006-05-10 12:49:14 int dfs(int r,int c) { int i,j,rr,cc; if(scan[r][c]==0) { scan[r][c]=1; s++; for(i=0;i<4;i++) { if(cas[r][c][i]==1) { rr=r+move[i][0]; cc=c+move[i][1]; dfs(rr,cc); } } return 1; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator