public class _3frozenDrinks { private static int n = 4; private static int m = 5; private static boolean[][] visited = new boolean[n][m]; private final static int[][] edges = { {0, 0, 1, 1, 0}, {0, 0, 0, 1, 1}, {1, 1, 1, 1, 1}, {0, 0, 0, 0, 0} }; private static int cnt = 0; public static void main(String[] args) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { if (dfs(i,j)) { cnt++;..