Sum of Subarray Maximum Times Length

Company: Schrodinger

Difficulty: medium