Fork Copy #include using namespace std; int n, m; int nt[700][700]; int checked[700][700]; int kq; int queuex[50000]; int queuey[50000]; int head, tail; void print(){ for (int i=0;i=0 && tmpx=0 && tmpy=0 && tmpx=0 && tmpy>T; for (int tc=1;tc<=T;++tc){ kq=0; cin>>n>>m; for (int i=0;i>nt[i][j]; if (nt[i][j]==0) checked[i][j]=1; else checked[i][j]=0; } } for (int i=0;i