c++(simple solution)
\n# Approach\n Describe your approach to solving the problem. \n\nInitialization:\n\nInitialize a vector v to store the minimum side lengths of each rectangle.\
\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\nInitialization:\n\nInitialize a vector v to store the minimum side lengths of each rectangle.\nInitialize variables minv to keep track of the minimum side length for each rectangle, maxx to store the count of rectangles with the maximum side length, and an unordered map m to store the frequency of each minimum side length.\nIterating over Rectangles:\n\nIterate over each rectangle in the input vector rect.\nFor each rectangle, calculate the minimum side length (minv) by taking the minimum value between rect[i][0] and rect[i][1].\nPush the minv value into the vector v.\nSorting the Minimum Side Lengths:\n\nSort the vector v in descending order using std::sort with greater<int>() as the comparator.\nCounting Maximum Side Length Occurrences:\n\nInitialize maxx to 0 and s to the first element of the sorted vector v.\nIterate over the sorted vector v.\nIf the current element is equal to s, increment maxx.\nReturn Result:\n\nThe variable maxx now contains the count of rectangles with the maximum side length.\nReturn the value of maxx.\n\n# Complexity\n- Time complexity:O(N log N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(N)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int countGoodRectangles(vector<vector<int>>& rect) {\n        vector<int>v;\n        int minv=0;\n        unordered_map<int,int>m;\n        for(int i=0;i<rect.size();i++){\n            minv=min(rect[i][0],rect[i][1]);\n            v.push_back(minv);\n        }\n        sort(v.begin(),v.end(),greater<int>());\n        int maxx=0;\n        int s=v[0];\n        for(int i=0;i<v.size();i++){\n            if(s==v[i])maxx++;\n        }\n        return maxx;\n    }\n};\n```
['C++']