#include using namespace std; int *solid; int n,m; //n=x m=y; struct Vector2 { Vector2(int X,int Y) { x=X; y=Y; } Vector2(){x=0;y=0;} int x; int y; }; int getTile(int *a,int x,int y) { return a[y*n+x]; } void setTile(int *a,int x,int y,int val) { a[y*n+x]=val; } int main() { cin>>n>>m; // l=new int[n*m]; solid=new int[m*n]; for(int y=0; y>s; for(int x=0; x=0 && directions[i].x+queue[p].x=0 && directions[i].y+queue[p].y