```
int maxPrev = A[0], minPrev = A[0];
int maxHere = A[0];
int maxProd = A[0];
for (int i=1; i<A.size(); i++){
maxHere = max( max( maxPrev * A[i], minPrev * A[i] ), A[i] );
maxProd = max(maxHere, maxProd);
minPrev = min( min( maxPrev * A[i], minPrev * A[i] ), A[i] );
maxPrev = maxHere;
}
return maxProd;
```

I‘m confused.

.