https://leetcode.com/problems/container-with-most-water/#/description
class Solution(object):
def maxArea(self, height):
"""
:type height: List[int]
:rtype: int
"""
maxv=0
left=0
right=len(height)-1
while left<right:
maxv = max(maxv,min(height[left], height[right])*(right-left))
if height[left]>height[right]: right -= 1
else : left += 1
return maxv
思路:dp