Simple Cpp Solution
Complexity\n- Time complexity: O(n)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. O(n) \n\n# Co
# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int areaOfMaxDiagonal(vector<vector<int>>& dimensions) {\n        \n        double max_diagonal = 0;\n        int max_area = 0;\n\n        for (const auto& rectangle : dimensions) {\n            int length = rectangle[0];\n            int width = rectangle[1];\n\n            double diagonal_length = sqrt(pow(length, 2) + pow(width, 2));\n\n            if (diagonal_length > max_diagonal || (diagonal_length == max_diagonal && length * width > max_area)) {\n                max_diagonal = diagonal_length;\n                max_area = length * width;\n            }\n        }\n\n        return max_area;\n        \n    }\n};\n```
['C++']