include include include using namespace std;int map[105][105],val[105][105];struct node{ int x,y,c,v;};queue<node>q;int main() { int m,n,di[4][2]={0,1,1,0,0,-1,-1,0},ans=0x7f7f7f7f; memset(map,-1,sizeof(map)); memset(val,0x7f,sizeof(val)); cin>>m>>n; for(int i=...