100% beats soln
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) {
        int maxarea=INT_MIN;
        double max_diagonal=0.0;

        for(const auto& dim:dimensions){
            int l = dim[0];
            int w = dim[1];

            double dl = sqrt(l*l + w*w);
            int area =l*w;
//check for max_diagonal and area cond and update the largest one.
            if(dl>max_diagonal || (dl==max_diagonal &&area>maxarea)){
                max_diagonal = dl;
                maxarea=area;
            }
        }
        return maxarea;
        
    }
};
```
![d9a30a34-57a0-40f1-adab-43bec86a259a_1723795301.0363479.png](https://assets.leetcode.com/users/images/789fae91-2323-4d41-a7a3-1702fef0c8f8_1736143315.6350305.png)

['C++']