You are given an array of length
. You want to count the number of subarrays of length
whose sum is strictly larger than the sum of any subarray of length
.
Input Specification
The first line will contain the integers
.
The second line will contain integers,
.
Output Specification
Output the number of subarrays of length whose sum is strictly larger than the sum of any subarray of length
.
Subtasks
Subtask 1 [30%]
Subtask 2 [70%]
No further constraints.
Sample Input
4 2
2 3 2 4
Sample Output
3
Comments