## A Subarray Problem 2

View as PDF

Points: 5 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

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 .

No further constraints.

#### Sample Input

4 2
2 3 2 4

#### Sample Output

3