我的细胞为什么错了
http://ybt.ssoier.cn:8088/problem_show.php?pid=1329
```c++
#include<iostream>
#include<queue>
using namespace std;
int n,m;
int s[4][2]={{1,0},{0,1},{-1,0},{0,-1}};
char a[1000][1000];
int mk[1000][1000];
int res=0;
struct node{
int x;
int y;
};
void bfs(int x,int y){
queue<node>q;
q.push((node){x,y});
while(q.size()){
for(int i=0;i<4;i++){
node t=q.front();
q.pop();
int xx=t.x+s[i][0];
int yy=t.y+s[i][1];
if(xx>=0&&xx<n&&yy>=0&&yy<m&&mk[xx][yy]==0&&a[xx][yy]!='0'){
mk[xx][yy]=1;
q.push((node){xx,yy});
}
}
}
}
int main(){
cin>>m>>n;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>a[i][j];
}
}
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
if(a[i][j]!='0'&&mk[i][j]==0){
res+=1;
mk[i][j]=1;
bfs(i,j);
}
}
}
cout<<res<<endl;
return 0;
}
谢谢!