~/algor $ cat problems/minmax-34-maksimumning-eng-uzun-qatori
Longest run of the maximum
Medium
1000 ms
128 MB
58%
A positive integer $N$ and $N$ 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 $N$. The next line contains $N$ integers $A_{i}$.
Output
One integer.
Note
$1 \le N \le 10^{5}$
$-10^{9} \le A_{i} \le 10^{9}$
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