#include #define int long long #define I using #define AK namespace #define CSPS2025 std I AK CSPS2025; const int maxn=1e5+10,maxm=1e2+10,mod=998244353,inf=1e18; int n,m,u,v,w,x,y,z,res,ans,vis[maxn],dp[maxn]; char arr[maxm][maxm]; vectorg[maxn]; int dfs(int u,int v) { return (u-1)*m+v; } void add(int u,int v,int q,int w) { g[dfs(u,v)].push_back(dfs(q,w)); g[dfs(q,w)].push_back(dfs(u,v)); } int solve(int u) { dp[u]=1; for(auto v:g[u]) { int w=vis[v]; if(w==inf or (!dp[w] and solve(w))) { vis[u]=v; vis[v]=u; return 1; } } return 0; } signed main() { // freopen("chocolate.in","r",stdin); // freopen("chocolate.out","w",stdout); cin>>n>>m; for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { cin>>arr[i][j]; } } for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { if(arr[i][j]=='.') { continue; } else if(arr[i][j]=='b') { u++; } else if(arr[i][j]=='w') { v++; } if(i