#include #include using namespace std; typedef pair pii; int W, H, ans=999; char fld[20][20]; int tag[20][20]; bool is_fld(int h, int w){ return (0<=h&&h> W>> H; for(int i=0; i> fld[i][j]; } } fill(tag[0], tag[20], -1); solve(); cout<< ans<< endl; return 0; }