C++ short solution


  • 2
    Z
    class Solution {
    public:
        int maxCount(int m, int n, vector<vector<int>>& ops) {
            for (int i = 0; i < ops.size(); ++i) {
                m = min(m, ops[i][0]);
                n = min(n, ops[i][1]);
            }
            return m*n;
        }
    };
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.