#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define mp make_pair #include #include #include #include #include #include #include #define maximum 1000000000 #include int n; using namespace std; queue>>q; bool inrange(int x,int y){ //cout<=0 and y>=0 and y> tempi=q.front(); q.pop(); int x=tempi.second.first; int y=tempi.second.second; //cout<> n; memset(visited,0,sizeof(visited)); //cout<=maximum){ans[i][j]=-1;} //cout<