或许是开太小了?
by Perseverance @ 2019-05-28 19:23:24
队列数组
by Perseverance @ 2019-05-28 19:23:34
@[Perseverance](/space/show?uid=116396) 数组略大一点的话#9也会挂,但是不管开多大#2都是RE
by littleseven @ 2019-05-28 19:55:46
if(x>0&&x<=n&&y>0&&y<=m&&a[x][y]=='W')
{
tail++; h[tail][1]=x,h[tail][2]=y; a[x][y]='.';
}
先if(x<1||y<1||x>n||y>m)continue;试试?
或许是这里的a[x][y]x或y越界了?
by Perseverance @ 2019-05-28 20:26:33
话说您不是A了吗
by Perseverance @ 2019-05-28 20:26:44
我也是写代码巨粗心的人。。。
by Perseverance @ 2019-05-28 20:27:23