#include using namespace std; int H, W; string mat[111]; int acc_x[111][111], acc_y[111][111]; int get_y(int x, int yt, int ys){ if(ys > yt)return 100000; return acc_y[x][yt+1] - acc_y[x][ys]; } int get_x(int y, int xt, int xs){ if(xs > xt)return 100000; return acc_x[y][xt+1] - acc_x[y][xs]; } string solve(){ int top = 111, bot = -1, lef = 111, rig = -1; int tot = 0; for(int y=0;y> H >> W; for(int i=0;i> mat[i]; cout << solve() << endl; return 0; }