#P13581. [NWRRC 2023] Axis-Aligned Area
[NWRRC 2023] Axis-Aligned Area
Description
Alex has four sticks with positive integer lengths , , , and ().
She wants to place them on a plane in such a way that each stick is parallel to one of the two coordinate axes, and the area enclosed by these sticks is as large as possible.
Find this maximum enclosed area.
Input Format
The input contains four positive integers , , , and , each on a separate line, denoting the lengths of the sticks in non-decreasing order ().
Output Format
Print the maximum area that can be enclosed.
2
2
4
7
8
10
10
10
10
100
Hint
Here is one optimal way to place the sticks on the plane for the first example:

The enclosed area is shaded in gray.
京公网安备 11011102002149号