easy solution
Code\n\nclass Solution {\npublic:\n    int areaOfMaxDiagonal(vector<vector<int>>& dimensions) {\n        float maxarea = -1 ;\n        float maxdiagonal = -1 ;\
# Code\n```\nclass Solution {\npublic:\n    int areaOfMaxDiagonal(vector<vector<int>>& dimensions) {\n        float maxarea = -1 ;\n        float maxdiagonal = -1 ;\n        float length, width, diagonal, area ;\n        for (int i=0; i<dimensions.size(); i++){\n            length = dimensions[i][0] ;\n            width = dimensions[i][1] ;\n            diagonal = sqrt(length*length + width*width) ;\n            if (diagonal >= maxdiagonal){\n                area = length * width ;\n                if (diagonal > maxdiagonal){\n                    maxarea = area ;\n                }\n                else maxarea = max(area, maxarea) ;\n                maxdiagonal = diagonal ;\n            }\n        }\n        return maxarea ;\n    }\n};\n```
['C++']