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

Re:DFS

Posted by y05yxg at 2007-05-11 21:15:51 on Problem 1164
In 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:
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