C++ solution || easy to understand!
```\nclass Solution {\npublic:\n    int countGoodRectangles(vector>& rect) {\n        vectorans;\n        int c=0;\n        for(int i=0;i<rect.size();i++){\n   
```\nclass Solution {\npublic:\n    int countGoodRectangles(vector<vector<int>>& rect) {\n        vector<int>ans;\n        int c=0;\n        for(int i=0;i<rect.size();i++){\n     \n            ans.push_back(*min_element(rect[i].begin(),rect[i].end()));\n      \n            \n        }\n       \n        int m=*max_element(ans.begin(),ans.end());\n        for(int i=0;i<ans.size();i++){\n            \n           if(ans[i]==m)c++;\n        }\n        return c;\n    }\n};
['C']