C solution
Code


# Code
```c []
int countGoodRectangles(int** r, int n, int* c) {
    int max = 0, cnt = 0;
    for (int i = 0; i < n; i++) {
        int side = r[i][0] < r[i][1] ? r[i][0] : r[i][1];
        if (side > max) {
            max = side;
            cnt = 1;
        } else if (side == max) {
            cnt++;
        }
    }
    return cnt;
}
```
['C']