#include using namespace std; random_device rnd; mt19937 mt(rnd()); char S[100][100][100]; string G[100],best[100]; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N,U; cin >> N >> U; int H,W; cin >> H >> W; vector F(N); for(int i=0; i> f; F.at(i) = f; for(int k=0; k> S[i][k]; } int answer = -1001001001,now = 0; for(int i=0; i void { if(y == W) y = 0,x++; if(x == H){ now = 0; for(int i=0; i zero(H,string(W,'.')); while(true){ for(auto &h : zero) for(auto &w : h) w = mt()%2?'#':'.'; bool ok = true; for(int i=0; i NG(N); for(int i=1; i void { if(answer >= now) return; answer = now; for(int i=0; i void { for(int i=0; i