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

深搜,终于100道了。。。

Posted by songzi at 2008-10-26 14:59:07 on Problem 1979
// #include<iostream>
// 
// using namespace std;
// 
// const int MAX_SIZE=21; 
// char rb[MAX_SIZE][MAX_SIZE];
// 
// 
// int a[4]={1,0,0,-1};
// int b[4]={0,1,-1,0};
// int cnt;
// void search(int x0,int y0)
// {int i,x,y;
// cnt++; rb[x0][y0]='X';
// for (i=0;i<4;i++)
// { x=x0+a[i]; y=y0+b[i];
// if(x>=0&&y>=0&&rb[x][y]=='.')
// search(x,y);
// }
// 
// }
// 
// int main()
// {int x0,y0,m,n,i,j;
// 
// while (cin>>m>>n)
// {	if(m==0&&n==0) break;
// 	cnt=0;
// 	memset(rb,' ',sizeof(rb));
// 	for (i=0;i<n;i++)
// 	for (j=0;j<m;j++)
// 	{cin>>rb[i][j];
// 	if(rb[i][j]=='@') {x0=i;y0=j;}
// 	}
// 
// 	search(x0,y0);
// 	cout<<cnt<<endl;	



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