rects, where rects[i] = [length, width].
Find the rectangle whose diagonal is the longest and return its area. If several rectangles share the longest diagonal, return the largest area among them.rects=[[2, 9], [6, 7]] → 42
The squared diagonals are 4 + 81 = 85 and 36 + 49 = 85, a tie. Of the areas 18 and 42 we take the larger.
rects=[[10, 1], [7, 7]] → 10
The first rectangle has the longer diagonal (√101 vs √98), so the answer is its area, 10.
rects=[[4, 4]] → 16
len(rects) ≤ 100len(rects[i]) == 2rects[i][0], rects[i][1] ≤ 100rects=[[2, 9], [6, 7]]
42
Run checks the first 3 tests in your browser. Submit checks all 109 tests on the server, hidden ones included.