Current building paired with the building greater in height and on the extreme left
int left = 0 ; if ( minIndSoFar < pairs [ i ] . first ) { left = ( pairs [ i ] . second * ( pairs [ i ] . first - minIndSoFar - 1 ) ) ; }