## DMOPC '18 Contest 5 P3 - A Familiar Problem

View as PDF

Points: 7 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

For her birthday, Mimi received a set of pencil crayons. Mimi loves her beautiful pencil crayons. In fact, she loves them so much that she assigned each of them individual names, a backstory, and also a cuteness number, .

One day, Mimi lent out her pencil crayons for an art class assignment. When the class ended, her friend returned the pencil crayons in a neat row. Mimi then asked her a curious question:

What is the longest contiguous subsequence where the sum of the cuteness numbers is strictly less than ?

#### Input Specification

The first line of input will contain two space-separated integers, and .
The second line of input will contain space-separated integers, .

#### Output Specification

A single integer, the length of the longest subarray where the sum of the cuteness numbers is strictly less than .

#### Sample Input

5 3
1 1 1 2 3

#### Sample Output

2