#C7318. Longest Contiguous Subarray of Equal Elements
Longest Contiguous Subarray of Equal Elements
Longest Contiguous Subarray of Equal Elements
Given an array of integers, your task is to find the length of the longest contiguous subarray in which all the elements are identical.
Constraints:
- The number of elements, \(N\), satisfies: \(1 \leq N \leq 10^5\).
- Each element \(a_i\) satisfies: \(1 \leq a_i \leq 10^9\).
The input is given via standard input (stdin) and the output should be printed to standard output (stdout).
inputFormat
The first line contains a single integer \(N\) indicating the number of elements in the array.
The second line contains \(N\) space-separated integers representing the elements of the array.
outputFormat
Output a single integer representing the length of the longest contiguous subarray where all the elements are the same.
## sample1
5
1
</p>