#include "bits/stdc++.h" using namespace std; #define print(x) cout< PI; typedef pair V; typedef vector VE; const ll mod = 1000000007; //10^9+7 int w,h; int m[102][102]; int cp[102][102]; int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; bool check(int y,int x, int _){ if((y>=0&&y=0&&x>w>>h; REP(i,h)REP(j,w)cin>>m[i][j]; ////REP(i,h){REP(j,w)cout< que; //print("new x y"<<" "<