Given n vertical lines of the given heights on the x-axis, pick two so that the container they form (with the x-axis) holds the most water. The area between lines at positions i and j is min(height[i], height[j]) × (j − i).
Input
Line 1: an integer n.
Line 2: n non-negative integers, the heights.
Output
The maximum area.