F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_13469423_31460.cpp:3:8: error: 'size' was not declared in this scope
 da que[size];char ch[201][201];int f[201][201];
        ^
0_0_13469423_31460.cpp: In function 'int main()':
0_0_13469423_31460.cpp:4:329: error: 'que' was not declared in this scope
 int main(){    int m,n,i,j,rear,front,x,y,xx,yy,st,en,time;    int x1,y1,x2,y2,k,flag,an;   while(scanf("%d%d",&m,&n)!=EOF)   {    k=1;    for(i=0;i<m;i++)     {    scanf("%s",ch[i]);      for(j=0;j<n&&k<=1;j++)      {      if(ch[i][j]=='r')      {x1=i;y1=j;k++;}                    }                    }    front=0;rear=1;    que[rear].x=x1;que[rear].y=y1;    que[rear].time=0;    memset(f,0,sizeof(f));    f[x1][y1]=1;flag=0;    while(front<rear) //控制队列    {       st=front;en=rear;       for(i=st+1;i<=en;i++)       {       x=que[i].x;y=que[i].y;time=que[i].time;       if(ch[x][y]=='a') {flag=1;an=time;break;}       if(ch[x][y]=='x')  //特殊处理       {       rear++;       que[rear].x=x;que[rear].y=y;que[rear].time=time+1;            ch[x][y]='.';     //注意这里不可以少              }       else          //四个方向           for(j=0;j<4;j++)          {          xx=x+p[j][0];yy=y+p[j][1];          if(xx<0||xx>=m||yy<0||yy>=n) continue;          if(f[xx][yy]) continue;          if(ch[xx][yy]=='#') continue;          rear++;          que[rear].x=xx;que[rear].y=yy;que[rear].time=time+1;            f[xx][yy]=1;                       }                          }       front=en;                     }    if(flag) printf("%d\n",an);    else printf("Poor ANGEL has to stay in the prison all his life.\n");   }    }           
                                                                                                                                                                                                                                                                                                                                         ^
0_0_13469423_31460.cpp:4:404: error: 'memset' was not declared in this scope
 int main(){    int m,n,i,j,rear,front,x,y,xx,yy,st,en,time;    int x1,y1,x2,y2,k,flag,an;   while(scanf("%d%d",&m,&n)!=EOF)   {    k=1;    for(i=0;i<m;i++)     {    scanf("%s",ch[i]);      for(j=0;j<n&&k<=1;j++)      {      if(ch[i][j]=='r')      {x1=i;y1=j;k++;}                    }                    }    front=0;rear=1;    que[rear].x=x1;que[rear].y=y1;    que[rear].time=0;    memset(f,0,sizeof(f));    f[x1][y1]=1;flag=0;    while(front<rear) //控制队列    {       st=front;en=rear;       for(i=st+1;i<=en;i++)       {       x=que[i].x;y=que[i].y;time=que[i].time;       if(ch[x][y]=='a') {flag=1;an=time;break;}       if(ch[x][y]=='x')  //特殊处理       {       rear++;       que[rear].x=x;que[rear].y=y;que[rear].time=time+1;            ch[x][y]='.';     //注意这里不可以少              }       else          //四个方向           for(j=0;j<4;j++)          {          xx=x+p[j][0];yy=y+p[j][1];          if(xx<0||xx>=m||yy<0||yy>=n) continue;          if(f[xx][yy]) continue;          if(ch[xx][yy]=='#') continue;          rear++;          que[rear].x=xx;que[rear].y=yy;que[rear].time=time+1;            f[xx][yy]=1;                       }                          }       front=en;                     }    if(flag) printf("%d\n",an);    else printf("Poor ANGEL has to stay in the prison all his life.\n");   }    }           
                                                                                                                                                                                                                                                                                                                                                                                                                    ^
0_0_13469423_31460.cpp:4:449: error: expected statement at end of input
 int main(){    int m,n,i,j,rear,front,x,y,xx,yy,st,en,time;    int x1,y1,x2,y2,k,flag,an;   while(scanf("%d%d",&m,&n)!=EOF)   {    k=1;    for(i=0;i<m;i++)     {    scanf("%s",ch[i]);      for(j=0;j<n&&k<=1;j++)      {      if(ch[i][j]=='r')      {x1=i;y1=j;k++;}                    }                    }    front=0;rear=1;    que[rear].x=x1;que[rear].y=y1;    que[rear].time=0;    memset(f,0,sizeof(f));    f[x1][y1]=1;flag=0;    while(front<rear) //控制队列    {       st=front;en=rear;       for(i=st+1;i<=en;i++)       {       x=que[i].x;y=que[i].y;time=que[i].time;       if(ch[x][y]=='a') {flag=1;an=time;break;}       if(ch[x][y]=='x')  //特殊处理       {       rear++;       que[rear].x=x;que[rear].y=y;que[rear].time=time+1;            ch[x][y]='.';     //注意这里不可以少              }       else          //四个方向           for(j=0;j<4;j++)          {          xx=x+p[j][0];yy=y+p[j][1];          if(xx<0||xx>=m||yy<0||yy>=n) continue;          if(f[xx][yy]) continue;          if(ch[xx][yy]=='#') continue;          rear++;          que[rear].x=xx;que[rear].y=yy;que[rear].time=time+1;            f[xx][yy]=1;                       }                          }       front=en;                     }    if(flag) printf("%d\n",an);    else printf("Poor ANGEL has to stay in the prison all his life.\n");   }    }           
                                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^
0_0_13469423_31460.cpp:4:449: error: expected '}' at end of input
0_0_13469423_31460.cpp:4:449: error: expected '}' at end of input


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-12-02 07:13:39, Gzip enabled