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:WR...why?....

Posted by carber at 2010-05-04 22:46:16 on Problem 2251
In Reply To:WR...why?.... Posted by:sogo at 2010-05-04 22:31:15
while(front < end)
		{
			if(n[a[front].c][a[front].x][a[front].y]=='E') break;
			for(int i = 0; i < 6; i++)
			{
				int cl = a[front].c + dir[i][0];
				int x  = a[front].x + dir[i][1];
				int y  = a[front].y + dir[i][2];
				if(ok(cl,x,y)) 
				{
					a[end].c = cl;
					a[end].x = x ;
					a[end].y = y ;
					a[end++].step = a[front].step + 1;
					u[cl][x][y] = 1;
				}
			}
			front++;
		}
		if(front<end) printf("Escaped in %d minute(s).\n",a[front].step);
		else printf("Trapped!\n");
//这样就可以了,具体为什么不知道。。。。

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