Description
给出一些数字,统计出现最多的数字的次数。
Input
输入中第一行包含一个N,0 < N <= 500000。
后面N行每行包含一个数字k,0<=k<=200000。
Output
输出出现次数最多的数字的个数。
Sample Input
5
1
1
2
3
4
Sample Output
2
HINT
Append Code
#include <stdio.h>
int main()
{
int N,k,i,max;
int a[500000]={0};
scanf("%d",&N);
max=0;
for(i=1;i<=N;i++)
{
scanf("%d",&k);
a[k]++;
if(max<a[k])
max=a[k];
}
printf("%d\n",max);
return 0;
}