题目描述
Problem Description
Given a sequence of length $ N $, $A_1,\ A_2,\ \ldots,\ A_N$, where each term is an integer between $ 1 $ and $ M $ inclusive.
Define a new sequence of length $ M $, $B_1,\ B_2,\ \ldots,\ B_M$, as follows:
- For each $ j $ ($1\ \leqq\ j\ \leqq\ M$), $ B_j $ is equal to the number of integers $ i $ ($1\ \leqq\ i\ \leqq\ N$) such that $A_i\ =\ j$.
Find the maximum value of $B_1,\ B_2,\ \ldots,\ B_M$.
Input Format
The input is given from the standard input in the following format:
$ N $ $ M $ $ A_1 $ $ A_2 $ $\cdots$ $ A_N $
Output Format
Output the maximum value of $B_1,\ B_2,\ \ldots,\ B_M$ in one line.
Sample Input and Output
Sample Input #1
4 3
1 1 2 3
Sample Output #1
2
Sample Input #2
6 5
3 3 2 1 2 3
Sample Output #2
3
Notes/Hints
Constraints
- $1\ \leqq\ N\ \leqq\ 100$.
- $1\ \leqq\ M\ \leqq\ 100$.
- $1\ \leqq\ A_i\ \leqq\ M$ ($1\ \leqq\ i\ \leqq\ N$).
Sample Explanation 1
The sequence $B_1,\ B_2,\ B_3$ is $2,\ 1,\ 1$, and the maximum value among these is $ 2 $.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
4 3
1 1 2 3
样例输出
2