class Solution {
public:
int maxArea(vector & height) {
int s=height.size();
int b=0;
double pa=0;
int k;
for(int i=s;i>1;i--)
{
for(int j=0;j<i-1;j++)
{
if(height[j]>height[i])
{
pa=height[i](i-j);
if(pa>b)
{
b=pa;
}
}
else{
pa=height[j](i-j);
if(pa>b)
{
b=pa;
}
}
}
}
return b;
}
};