CF1003A.Polycarp's Pockets

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Polycarp has nn coins, the value of the ii -th coin is aia_i . Polycarp wants to distribute all the coins between his pockets, but he cannot put two coins with the same value into the same pocket.

For example, if Polycarp has got six coins represented as an array a=[1,2,4,3,3,2]a = [1, 2, 4, 3, 3, 2] , he can distribute the coins into two pockets as follows: [1,2,3],[2,3,4][1, 2, 3], [2, 3, 4] .

Polycarp wants to distribute all the coins with the minimum number of used pockets. Help him to do that.

输入格式

The first line of the input contains one integer nn ( 1n1001 \le n \le 100 ) — the number of coins.

The second line of the input contains nn integers a1,a2,,ana_1, a_2, \dots, a_n ( 1ai1001 \le a_i \le 100 ) — values of coins.

输出格式

Print only one integer — the minimum number of pockets Polycarp needs to distribute all the coins so no two coins with the same value are put into the same pocket.

输入输出样例

  • 输入#1

    6
    1 2 4 3 3 2
    

    输出#1

    2
    
  • 输入#2

    1
    100
    

    输出#2

    1
    
首页