}intcount =0;for(inti =0; i < n; i++) {for(intj =0; j < n; j++) {if(img[i][j] =='#'&& vis[i][j] ==false) {intsum =0, bound =0; bfs(i, j, sum, bound);if(sum == bound)count++; } } } cout<<count;return0; }...