| ||||||||||
| 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:WR...why?....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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator