Robotics (TER4M) is an intensive course at William Lyon Mackenzie CI, which requires students to program and design advanced machinery.
however prioritizes his top-6 marks, and doesn't quite put as much effort into the project. The ISP, worth 30% of the final mark, is supposed to pick up tennis balls and throw them over a wall where the opponent is also throwing tennis balls over. The player to throw the most tennis balls into the opponent's field during 2 minutes win.However,
Input Specification
The first line will contain integers
Subtask 1 [25%]
Subtask 2 [75%]
Note: Fast input may be required.
Output Specification
Output the largest possible area.
Sample Input
Copy
4
2 2 4 5
Sample Output
Copy
8
Explanation
We can take the piece with 4 cm as the width, take the 5 cm piece and cut off 1 cm so it's also the width, and then take the 2 cm pieces as the height. The area is
Comments
What do we output if there is no rectangle possible?
0