JAVA EASY SOLUTION
\nclass Solution {\n    public int maximumRows(int[][] mat, int cols) {\n        int rows = mat.length;\n        int col = mat[0].length;\n        int res = 0;\
```\nclass Solution {\n    public int maximumRows(int[][] mat, int cols) {\n        int rows = mat.length;\n        int col = mat[0].length;\n        int res = 0;\n        for(int i = 0; i < (1<<col); i++) {\n            if(getCount(i) == cols) {\n                int cnt = 0;\n                for(int r = 0; r < rows; r++) {\n                    int flag = 0;\n                    for(int c = 0; c < col; c++) {\n                        if(mat[r][c] == 1 && !isPresent(i,c)){\n                            flag = 1;\n                            break;\n                        }\n                    }\n                    if(flag == 0) {\n                       cnt++; \n                    }\n                }\n                res = Math.max(res,cnt);\n            }\n        }\n        return res;    \n    }\n    public static int getCount(int i) {\n        int cnt = 0;\n        while(i>0) {\n            cnt += (i&1);\n            i = i>>1;\n        }\n        return cnt;\n    }\n    public static boolean isPresent(int mask, int i) {\n        return ((mask>>i)&1) == 1;\n    }\n        \n}\n\n```
['Bitmask', 'Java']