Tap here to switch tabs
Problem
Submissions

Problem: Maximum Subarray Min-Product

med
30 min
Try to solve the Maximum Subarray Min-Product problem.

Statement

The min product of an array is defined as the minimum value in the array multiplied by the sum of all elements in the array.

Given an array of integers nums, return the maximum min product among all nonempty subarrays of nums. Since the answer can be large, return it modulo 109+710^9 + 7.

Note: The maximum min product must be determined before applying the modulo operation. A subarray is a contiguous sequence of elements within an array.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤107\leq 10^7

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Subarray Min-Product

med
30 min
Try to solve the Maximum Subarray Min-Product problem.

Statement

The min product of an array is defined as the minimum value in the array multiplied by the sum of all elements in the array.

Given an array of integers nums, return the maximum min product among all nonempty subarrays of nums. Since the answer can be large, return it modulo 109+710^9 + 7.

Note: The maximum min product must be determined before applying the modulo operation. A subarray is a contiguous sequence of elements within an array.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤107\leq 10^7