#include #include #include #include #define per pair #define x first #define y second using namespace std; vector v; queue q; int n,m; int dist[105][105]; int dx[]={1,0}; int dy[]={0,1}; int max() {int maxx=0; for (int i=0;imaxx) maxx=dist[i][j]; return maxx; } void fill() { for (int i=0;i=0 && j>=0 && i>n>>m; v.resize(n); for (int i=0;i>v[i]; if (v[0][0]=='&'){ cout<<0; return 0; } fill(); pil(); cout<