Given an array of integers nums and two integers a and b, return the total number of valid subarrays.
A subarray is defined as valid if both of the following conditions are satisfied:
It contains at least
The ratio of the number of even integers to the number of odd integers in the subarray does not exceed
Constraints:
nums.length
nums[i]
a, b
Given an array of integers nums and two integers a and b, return the total number of valid subarrays.
A subarray is defined as valid if both of the following conditions are satisfied:
It contains at least
The ratio of the number of even integers to the number of odd integers in the subarray does not exceed
Constraints:
nums.length
nums[i]
a, b