~/algor $ cat contests/round-9/K
K. Longest run of the maximum
Problem K
ICPC rules
1000 ms
128 MB
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