C++ Solution


  • 0

    int maxCount(int m, int n, vector<vector<int>>& ops)
    {

        int minimuma = INT_MAX , minimumb = INT_MAX;
        for(int k=0;k<ops.size();k++)
        {
            int a = ops[k][0];
            int b = ops[k][1];
            minimuma = min(minimuma,a);
            minimumb = min(minimumb,b);
            
        }
        if(minimuma == INT_MAX)
            return 0;
        
        return minimuma*minimumb;
        
    }

Log in to reply
 

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