~/algor $ cat problems/minmax/longest-run-of-the-maximum
Longest run of the maximum
Medium
1000 ms
128 MB
58%
A positive integer and integers are given. Find the greatest length of a segment of consecutive elements, each of which is equal to the largest value.
Input
The first line contains a positive integer . The next line contains integers .
Output
One integer.
Note
Examples
Input #1
9 5 7 7 2 7 7 7 1 7
Output #1
3
Input #2
4 -1 3 -1 2
Output #2
1