#include #include #include //#include<> int yr,xr; char **pole; int xmax; int xmin; int ymax; int ymin; int pocet; int min(int x,int y) { return xy?x:y; } void vypln(int x, int y) { if(x<0||x>=xr||y<0||y>=yr)return; if(pole[x][y]!='#')return; pole[x][y]++; pocet++; xmin=min(x,xmin); xmax=max(x,xmax); ymin=min(y,ymin); ymax=max(y,ymax); vypln(x+1,y); vypln(x+1,y+1); vypln(x+1,y-1); vypln(x,y+1); vypln(x,y-1); vypln(x-1,y+1); vypln(x-1,y-1); vypln(x-1,y); } void pis() { /* for(int y=0;y>yr>>xr; if(xr==0 && yr==0 ) break; pole=new char*[xr]; for(int i=0;i>pole[x][y]; }while(pole[x][y]!='.'&& pole[x][y]!='#'); } } pis(); pocetlodi=0; bad=0; for(int x=0;x