Combinations and issubset(), 77% speed
\n\nclass Solution:\n    def maximumRows(self, matrix: List[List[int]], numSelect: int) -> int:\n        ans = 0\n        m_ones = [{i for i, v in enumerate(row
![image](https://assets.leetcode.com/users/images/8171d85f-39ee-4c54-adf6-390d2df8c7d4_1662979932.8895636.png)\n```\nclass Solution:\n    def maximumRows(self, matrix: List[List[int]], numSelect: int) -> int:\n        ans = 0\n        m_ones = [{i for i, v in enumerate(row) if v} for row in matrix]\n        for comb in combinations(range(len(matrix[0])), numSelect):\n            set_comb = set(comb)\n            ans = max(ans, sum(s.issubset(set_comb) for s in m_ones))\n        return ans\n```
['Python', 'Python3']