#K49607. Longest Uniform Subsequence
Longest Uniform Subsequence
Longest Uniform Subsequence
You are given an array A of integers. Your task is to find the length of the longest subsequence in which all the elements are the same. In other words, determine the maximum frequency among all the integers in the array.
Mathematically, if \( \text{count}(x) \) denotes the number of occurrences of integer \( x \) in the array, then you need to compute:
[ \max_{x \in A} ; \text{count}(x) ]
Note that the subsequence does not need to be contiguous; it refers simply to a collection of elements from the array that are equal.
inputFormat
The input is read from stdin and consists of two lines:
- The first line contains a single integer n denoting the number of elements in the array.
- The second line contains n space-separated integers representing the array elements.
outputFormat
Output to stdout a single integer, which is the length of the longest subsequence composed of identical numbers.
## sample1
1
1