//https://www.acmicpc.net/problem/1018 #include #include using namespace std;int N, M, mn;char map[50][50]; void input(){ cin >> N >> M; for(int i=0; i> map[i];} int painting_white_fst(int y, int x){ int cnt=0; for(int i=y; i> M; for(int i=0; i> map[i];} int painting_white_fst(int y, int x){ int cnt=0; for(int i=y; i