#include using namespace std; typedef long long int ll; typedef unsigned long long ull; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); ll myRand(ll B) { return (ull)rng() % B; } int dx[]={0,-1,0,1}; int dy[]={1,0,-1,0}; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int h,w; cin >> h >> w; vector> f(h,vector(w,false)); auto used=f; queue q; for(int i=0;i> c; f[i][j]=c; } } int res=0; for(int i=0;i