← 返回 google 的题目列表Find the Longest Subarray with a Given Mean
类型:online_judge
Given a stream of positive and negative integers, for each new integer received, find the longest contiguous subarray whose mean equals a given number S. The integers are inputted one by one, and after each input, output the current length of the longest subarray.
Example
Input
2
3
1
4
1
5
9
2
6