Easy C++ Solution
class Solution {\npublic:\n\n    int countGoodRectangles(vector>& rectangles) {\n       \n\t   vector ans ; \n        for(int i=0 ; irectangles[i][1]){\n       
class Solution {\npublic:\n\n    int countGoodRectangles(vector<vector<int>>& rectangles) {\n       \n\t   vector<int> ans ; \n        for(int i=0 ; i<rectangles.size();i++){\n            if(rectangles[i][0]>rectangles[i][1]){\n                ans.push_back(rectangles[i][1]);\n            }else \n                 ans.push_back(rectangles[i][0]);\n            }\n        int max = INT_MIN;\n        for(int i=0 ; i<ans.size();i++){\n            if(ans[i]>max){\n                max= ans[i];\n            } }\n        int count = 0 ; \n        for(int i=0 ; i<ans.size() ; i++){\n            if(ans[i]==max){\n              count ++ ;}\n        }\n        return count ; \n    }\n};
[]