0ms C++
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    int areaOfMaxDiagonal(vector<vector<int>>& dimensions) {

        if (dimensions.size() == 1)
            return dimensions[0][0] * dimensions[0][1];

        float n[dimensions.size()];

        int maxIndex = 0;
        float maxElement = 0;
        float maxArea = 0;

        for (int i = 0; i < dimensions.size(); i++) {
            n[i] = sqrt(dimensions[i][0] * dimensions[i][0] +
                        dimensions[i][1] * dimensions[i][1]);
            if (n[i] > maxElement) {
                maxElement = n[i];
                maxIndex = i;
                if (dimensions[i][0] * dimensions[i][1] > maxArea) {
                    maxArea = dimensions[i][0] * dimensions[i][1];
                }
            } else if (n[i] == maxElement) {
                if (dimensions[i][0] * dimensions[i][1] > maxArea) {
                    maxElement = n[i];
                    maxIndex = i;
                    maxArea = dimensions[i][0] * dimensions[i][1];
                }
            }
        }
        return dimensions[maxIndex][0] * dimensions[maxIndex][1];
    }
};
```
['C++']