#include <vector>

using namespace std;

int maxArea(vector<int>& height) {
  int max_global = 0;
  for (int i = 0; i<height.size() - 1; i++) {
    int max_sub = 0;
    for (int j = i + 1; j<height.size(); j++) {
      int sum = 0;
      int shorter = (height[j] > height[i]) ? height[i] : height[j];
