Boxes Packing

题意翻译

#### 题目描述 #### Mishka有$n$个空盒子,对于每一个$i(1 \le i \le n)$,第$i$个盒子是一个边长为$a_i$的正方体。 如果满足以下条件,Mishka可以将盒子$i$放入另一个盒子$j$中: - 第$i$个盒子没有放进另一个盒子里; - 第$j$个盒子不包含任何其他盒子; - 第$i$个盒子比第$j$个盒子小$(a_i<a_j )$。 Mishka可以将盒子互相放置任意次数。 他希望尽可能减少可以看见的盒子的数量。 如果一个盒子没有被放入另一个盒子中,则该盒子为可见的。 现请你帮助Mishka确定可见的盒子的最小可能数量。 #### 输入格式 #### 第一行包含一个整数$n(1 \le n \le 5000)$,表示Mishka有的空盒子数量。 第二行包含$n$个整数$a_1$,$a_2$,$...$,$a_n(1 \le a_i \le 10^9)$,$a_i$表示第$i$个盒子的边长。 #### 输出格式 #### 输出可见的盒子的最小可能数量。

题目描述

Mishka has got $ n $ empty boxes. For every $ i $ ( $ 1<=i<=n $ ), $ i $ -th box is a cube with side length $ a_{i} $ . Mishka can put a box $ i $ into another box $ j $ if the following conditions are met: - $ i $ -th box is not put into another box; - $ j $ -th box doesn't contain any other boxes; - box $ i $ is smaller than box $ j $ ( $ a_{i}&lt;a_{j} $ ). Mishka can put boxes into each other an arbitrary number of times. He wants to minimize the number of visible boxes. A box is called visible iff it is not put into some another box. Help Mishka to determine the minimum possible number of visible boxes!

输入输出格式

输入格式


The first line contains one integer $ n $ ( $ 1<=n<=5000 $ ) — the number of boxes Mishka has got. The second line contains $ n $ integers $ a_{1} $ , $ a_{2} $ , ..., $ a_{n} $ ( $ 1<=a_{i}<=10^{9} $ ), where $ a_{i} $ is the side length of $ i $ -th box.

输出格式


Print the minimum possible number of visible boxes.

输入输出样例

输入样例 #1

3
1 2 3

输出样例 #1

1

输入样例 #2

4
4 2 4 3

输出样例 #2

2

说明

In the first example it is possible to put box $ 1 $ into box $ 2 $ , and $ 2 $ into $ 3 $ . In the second example Mishka can put box $ 2 $ into box $ 3 $ , and box $ 4 $ into box $ 1 $ .