C++ Solution Beats 100%
Code
# Code
```cpp []
class Solution {
public:
    int maximumRows(vector<vector<int>> &matrix, int numSelect) {
        int n = matrix.size(),
            m = matrix[0].size();
        
        vector<int> comp(n);
        for(int i = 0; i < n; ++i)
            for(int j = 0; j < m; ++j)
                comp[i] |= (matrix[i][j] << j);

        int mx = 0, curr = 0;
        auto solve = [&](int ind, int left, auto &solve) {
            if(!left) {
                int count = 0;
                for(int j : comp)
                    count += (j & curr) == j;
                
                mx = max(mx, count);
                return;
            }

            if(ind == m) return;

            curr |= 1 << ind;
            solve(ind + 1, left - 1, solve);
            curr &= (~(1 << ind));
            solve(ind + 1, left, solve);
        };

        solve(0, numSelect, solve);

        return mx;
    }
};
```
['C++']