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_29483048_10453.cpp:1:53: error: stray '#' in program
 <span style="background-color: rgb(255, 255, 153);">#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#include<queue>using namespace std;char c[201];int z[4]={1,-1,0,0},u[4]={0,0,-1,1},m,n,xz,yz,num,nn,v[201][201][2];void find(int p,int q){ int x=0,y=0,t=0,w=1,i; int h[100001][4]; h[1][0]=p; h[1][1]=q; h[1][2]=0; h[1][3]=1; do {  t++;  if(!v[h[t][0]][h[t][1]][0])  {   for(i=0;i<4;i++)   {    x=h[t][0]+z[i];    y=h[t][1]+u[i];    if(x>=0&&x<m&&y>=0&&y<n&&!v[x][y][1]&&v[x][y][0])    {     w++;     h[w][0]=x;     h[w][1]=y;     h[w][2]=h[t][2]+1;     h[w][3]=t;     v[x][y][0]--;     v[x][y][1]=1;     if(x==xz&&y==yz)     {      num=h[w][2];      return;     }    }   }  }  if(v[h[t][0]][h[t][1]][0])  {   w++;   h[w][0]=h[t][0];   h[w][1]=h[t][1];   h[w][2]=h[t][2]+1;   h[w][3]=t;   v[x][y][1]=1;   v[h[w][0]][h[w][1]][0]=0;  } }while(t<w);}int main(){ int i,j,x,y; scanf("%d",&nn); for(int f=0;f<nn;f++) {  for(i=0;i<=200;i++)   memset(v[i],0,sizeof(v[i]));  scanf("%d%d",&m,&n);  num=0;  for(i=0;i<m;i++)  {   scanf("%s",c);   for(j=0;j<=n;j++)   {    if(c[j]=='#')     v[i][j][0]=0;    if(c[j]=='r')    {     x=i;     y=j;     v[i][j][0]=0;    }    if(c[j]=='a')    {     xz=i;     yz=j;     v[i][j][0]=1;    }    if(c[j]=='@')     v[i][j][0]=1;    if(c[j]=='x')     v[i][j][0]=2;   }  }  find(x,y);  if(num==0)   printf("Impossible\n");  else   printf("%d\n",num); }}</span>
                                                     ^
0_0_29483048_10453.cpp:1:71: error: stray '#' in program
 <span style="background-color: rgb(255, 255, 153);">#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#include<queue>using namespace std;char c[201];int z[4]={1,-1,0,0},u[4]={0,0,-1,1},m,n,xz,yz,num,nn,v[201][201][2];void find(int p,int q){ int x=0,y=0,t=0,w=1,i; int h[100001][4]; h[1][0]=p; h[1][1]=q; h[1][2]=0; h[1][3]=1; do {  t++;  if(!v[h[t][0]][h[t][1]][0])  {   for(i=0;i<4;i++)   {    x=h[t][0]+z[i];    y=h[t][1]+u[i];    if(x>=0&&x<m&&y>=0&&y<n&&!v[x][y][1]&&v[x][y][0])    {     w++;     h[w][0]=x;     h[w][1]=y;     h[w][2]=h[t][2]+1;     h[w][3]=t;     v[x][y][0]--;     v[x][y][1]=1;     if(x==xz&&y==yz)     {      num=h[w][2];      return;     }    }   }  }  if(v[h[t][0]][h[t][1]][0])  {   w++;   h[w][0]=h[t][0];   h[w][1]=h[t][1];   h[w][2]=h[t][2]+1;   h[w][3]=t;   v[x][y][1]=1;   v[h[w][0]][h[w][1]][0]=0;  } }while(t<w);}int main(){ int i,j,x,y; scanf("%d",&nn); for(int f=0;f<nn;f++) {  for(i=0;i<=200;i++)   memset(v[i],0,sizeof(v[i]));  scanf("%d%d",&m,&n);  num=0;  for(i=0;i<m;i++)  {   scanf("%s",c);   for(j=0;j<=n;j++)   {    if(c[j]=='#')     v[i][j][0]=0;    if(c[j]=='r')    {     x=i;     y=j;     v[i][j][0]=0;    }    if(c[j]=='a')    {     xz=i;     yz=j;     v[i][j][0]=1;    }    if(c[j]=='@')     v[i][j][0]=1;    if(c[j]=='x')     v[i][j][0]=2;   }  }  find(x,y);  if(num==0)   printf("Impossible\n");  else   printf("%d\n",num); }}</span>
                                                                       ^
0_0_29483048_10453.cpp:1:87: error: stray '#' in program
 <span style="background-color: rgb(255, 255, 153);">#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#include<queue>using namespace std;char c[201];int z[4]={1,-1,0,0},u[4]={0,0,-1,1},m,n,xz,yz,num,nn,v[201][201][2];void find(int p,int q){ int x=0,y=0,t=0,w=1,i; int h[100001][4]; h[1][0]=p; h[1][1]=q; h[1][2]=0; h[1][3]=1; do {  t++;  if(!v[h[t][0]][h[t][1]][0])  {   for(i=0;i<4;i++)   {    x=h[t][0]+z[i];    y=h[t][1]+u[i];    if(x>=0&&x<m&&y>=0&&y<n&&!v[x][y][1]&&v[x][y][0])    {     w++;     h[w][0]=x;     h[w][1]=y;     h[w][2]=h[t][2]+1;     h[w][3]=t;     v[x][y][0]--;     v[x][y][1]=1;     if(x==xz&&y==yz)     {      num=h[w][2];      return;     }    }   }  }  if(v[h[t][0]][h[t][1]][0])  {   w++;   h[w][0]=h[t][0];   h[w][1]=h[t][1];   h[w][2]=h[t][2]+1;   h[w][3]=t;   v[x][y][1]=1;   v[h[w][0]][h[w][1]][0]=0;  } }while(t<w);}int main(){ int i,j,x,y; scanf("%d",&nn); for(int f=0;f<nn;f++) {  for(i=0;i<=200;i++)   memset(v[i],0,sizeof(v[i]));  scanf("%d%d",&m,&n);  num=0;  for(i=0;i<m;i++)  {   scanf("%s",c);   for(j=0;j<=n;j++)   {    if(c[j]=='#')     v[i][j][0]=0;    if(c[j]=='r')    {     x=i;     y=j;     v[i][j][0]=0;    }    if(c[j]=='a')    {     xz=i;     yz=j;     v[i][j][0]=1;    }    if(c[j]=='@')     v[i][j][0]=1;    if(c[j]=='x')     v[i][j][0]=2;   }  }  find(x,y);  if(num==0)   printf("Impossible\n");  else   printf("%d\n",num); }}</span>
                                                                                       ^
0_0_29483048_10453.cpp:1:104: error: stray '#' in program
 <span style="background-color: rgb(255, 255, 153);">#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#include<queue>using namespace std;char c[201];int z[4]={1,-1,0,0},u[4]={0,0,-1,1},m,n,xz,yz,num,nn,v[201][201][2];void find(int p,int q){ int x=0,y=0,t=0,w=1,i; int h[100001][4]; h[1][0]=p; h[1][1]=q; h[1][2]=0; h[1][3]=1; do {  t++;  if(!v[h[t][0]][h[t][1]][0])  {   for(i=0;i<4;i++)   {    x=h[t][0]+z[i];    y=h[t][1]+u[i];    if(x>=0&&x<m&&y>=0&&y<n&&!v[x][y][1]&&v[x][y][0])    {     w++;     h[w][0]=x;     h[w][1]=y;     h[w][2]=h[t][2]+1;     h[w][3]=t;     v[x][y][0]--;     v[x][y][1]=1;     if(x==xz&&y==yz)     {      num=h[w][2];      return;     }    }   }  }  if(v[h[t][0]][h[t][1]][0])  {   w++;   h[w][0]=h[t][0];   h[w][1]=h[t][1];   h[w][2]=h[t][2]+1;   h[w][3]=t;   v[x][y][1]=1;   v[h[w][0]][h[w][1]][0]=0;  } }while(t<w);}int main(){ int i,j,x,y; scanf("%d",&nn); for(int f=0;f<nn;f++) {  for(i=0;i<=200;i++)   memset(v[i],0,sizeof(v[i]));  scanf("%d%d",&m,&n);  num=0;  for(i=0;i<m;i++)  {   scanf("%s",c);   for(j=0;j<=n;j++)   {    if(c[j]=='#')     v[i][j][0]=0;    if(c[j]=='r')    {     x=i;     y=j;     v[i][j][0]=0;    }    if(c[j]=='a')    {     xz=i;     yz=j;     v[i][j][0]=1;    }    if(c[j]=='@')     v[i][j][0]=1;    if(c[j]=='x')     v[i][j][0]=2;   }  }  find(x,y);  if(num==0)   printf("Impossible\n");  else   printf("%d\n",num); }}</span>
                                                                                                        ^
0_0_29483048_10453.cpp:1:119: error: stray '#' in program
 <span style="background-color: rgb(255, 255, 153);">#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#include<queue>using namespace std;char c[201];int z[4]={1,-1,0,0},u[4]={0,0,-1,1},m,n,xz,yz,num,nn,v[201][201][2];void find(int p,int q){ int x=0,y=0,t=0,w=1,i; int h[100001][4]; h[1][0]=p; h[1][1]=q; h[1][2]=0; h[1][3]=1; do {  t++;  if(!v[h[t][0]][h[t][1]][0])  {   for(i=0;i<4;i++)   {    x=h[t][0]+z[i];    y=h[t][1]+u[i];    if(x>=0&&x<m&&y>=0&&y<n&&!v[x][y][1]&&v[x][y][0])    {     w++;     h[w][0]=x;     h[w][1]=y;     h[w][2]=h[t][2]+1;     h[w][3]=t;     v[x][y][0]--;     v[x][y][1]=1;     if(x==xz&&y==yz)     {      num=h[w][2];      return;     }    }   }  }  if(v[h[t][0]][h[t][1]][0])  {   w++;   h[w][0]=h[t][0];   h[w][1]=h[t][1];   h[w][2]=h[t][2]+1;   h[w][3]=t;   v[x][y][1]=1;   v[h[w][0]][h[w][1]][0]=0;  } }while(t<w);}int main(){ int i,j,x,y; scanf("%d",&nn); for(int f=0;f<nn;f++) {  for(i=0;i<=200;i++)   memset(v[i],0,sizeof(v[i]));  scanf("%d%d",&m,&n);  num=0;  for(i=0;i<m;i++)  {   scanf("%s",c);   for(j=0;j<=n;j++)   {    if(c[j]=='#')     v[i][j][0]=0;    if(c[j]=='r')    {     x=i;     y=j;     v[i][j][0]=0;    }    if(c[j]=='a')    {     xz=i;     yz=j;     v[i][j][0]=1;    }    if(c[j]=='@')     v[i][j][0]=1;    if(c[j]=='x')     v[i][j][0]=2;   }  }  find(x,y);  if(num==0)   printf("Impossible\n");  else   printf("%d\n",num); }}</span>
                                                                                                                       ^
0_0_29483048_10453.cpp:1:138: error: stray '#' in program
 <span style="background-color: rgb(255, 255, 153);">#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#include<queue>using namespace std;char c[201];int z[4]={1,-1,0,0},u[4]={0,0,-1,1},m,n,xz,yz,num,nn,v[201][201][2];void find(int p,int q){ int x=0,y=0,t=0,w=1,i; int h[100001][4]; h[1][0]=p; h[1][1]=q; h[1][2]=0; h[1][3]=1; do {  t++;  if(!v[h[t][0]][h[t][1]][0])  {   for(i=0;i<4;i++)   {    x=h[t][0]+z[i];    y=h[t][1]+u[i];    if(x>=0&&x<m&&y>=0&&y<n&&!v[x][y][1]&&v[x][y][0])    {     w++;     h[w][0]=x;     h[w][1]=y;     h[w][2]=h[t][2]+1;     h[w][3]=t;     v[x][y][0]--;     v[x][y][1]=1;     if(x==xz&&y==yz)     {      num=h[w][2];      return;     }    }   }  }  if(v[h[t][0]][h[t][1]][0])  {   w++;   h[w][0]=h[t][0];   h[w][1]=h[t][1];   h[w][2]=h[t][2]+1;   h[w][3]=t;   v[x][y][1]=1;   v[h[w][0]][h[w][1]][0]=0;  } }while(t<w);}int main(){ int i,j,x,y; scanf("%d",&nn); for(int f=0;f<nn;f++) {  for(i=0;i<=200;i++)   memset(v[i],0,sizeof(v[i]));  scanf("%d%d",&m,&n);  num=0;  for(i=0;i<m;i++)  {   scanf("%s",c);   for(j=0;j<=n;j++)   {    if(c[j]=='#')     v[i][j][0]=0;    if(c[j]=='r')    {     x=i;     y=j;     v[i][j][0]=0;    }    if(c[j]=='a')    {     xz=i;     yz=j;     v[i][j][0]=1;    }    if(c[j]=='@')     v[i][j][0]=1;    if(c[j]=='x')     v[i][j][0]=2;   }  }  find(x,y);  if(num==0)   printf("Impossible\n");  else   printf("%d\n",num); }}</span>
                                                                                                                                          ^
0_0_29483048_10453.cpp:1:1: error: expected unqualified-id before '<' token
 <span style="background-color: rgb(255, 255, 153);">#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#include<queue>using namespace std;char c[201];int z[4]={1,-1,0,0},u[4]={0,0,-1,1},m,n,xz,yz,num,nn,v[201][201][2];void find(int p,int q){ int x=0,y=0,t=0,w=1,i; int h[100001][4]; h[1][0]=p; h[1][1]=q; h[1][2]=0; h[1][3]=1; do {  t++;  if(!v[h[t][0]][h[t][1]][0])  {   for(i=0;i<4;i++)   {    x=h[t][0]+z[i];    y=h[t][1]+u[i];    if(x>=0&&x<m&&y>=0&&y<n&&!v[x][y][1]&&v[x][y][0])    {     w++;     h[w][0]=x;     h[w][1]=y;     h[w][2]=h[t][2]+1;     h[w][3]=t;     v[x][y][0]--;     v[x][y][1]=


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-11-26 07:28:56, Gzip enabled