#K44937. Largest Rectangle Area
Largest Rectangle Area
Largest Rectangle Area
Given ( n ) rectangles, each with a width ( w_i ) and a height ( h_i ), your task is to find the rectangle that has the maximum area. The area of a rectangle is computed as ( A_i = w_i \times h_i ). Formally, you need to compute: [ \max_{1 \leq i \leq n} (w_i \times h_i) ] For example, if there are 4 rectangles with dimensions (1,2), (2,3), (3,4), and (4,5), then the maximum area is ( 4 \times 5 = 20 ).
inputFormat
The input is read from standard input (stdin). The first line contains an integer ( n ) (( 1 \le n \le 10^5 )), representing the number of rectangles. Each of the following ( n ) lines contains two integers ( w ) and ( h ) (( 1 \le w, h \le 10^9 )), representing the width and height of a rectangle.
outputFormat
Output to standard output (stdout) a single integer, which is the maximum area among all the given rectangles.## sample
4
1 2
2 3
3 4
4 5
20
</p>