mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
25 lines
519 B
C++
25 lines
519 B
C++
|
#include <iostream>
|
||
|
#include <cstring>
|
||
|
#include <cstdio>
|
||
|
#include <algorithm>
|
||
|
#define mem(a) memset(a, 0, sizeof(a))
|
||
|
using namespace std;
|
||
|
int n,f[3000+5];
|
||
|
int main()
|
||
|
{
|
||
|
while(~scanf("%d",&n))
|
||
|
{
|
||
|
int i;
|
||
|
for(i=0;i<n;i++)scanf("%d",&f[i]);
|
||
|
sort(f,f+n);
|
||
|
int max=1,count=1;
|
||
|
for(i=1;i<n;i++)
|
||
|
{
|
||
|
if(f[i]>f[i-1])count=1;
|
||
|
else { count++; max = max>count? max:count;}
|
||
|
}
|
||
|
printf("%d\n",max);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|