#include <bits/stdc++.h>
using namespace std;
int a[100010],z[100010];
int main()
{
	int b=0,c=0,d=0;
	cin >> b ;
	for(int i=1;i<=b;i++)
	{
		cin >> a[i];
		if(a[i]>=c)
		{
			c=a[i];
		}
	}
	for(int i=1;i<=b;i++)
	{
		z[a[i]]+=1;
	}
	for(int i=0;i<=c;i++)
	{
		if(z[i]>=d)
		{
			d=z[i];
		}
	}
	cout << d ;
	return 0;
 }

1 comments

  • @ 2023-10-31 21:01:58

    因为平台要保证连续,而不是把每个高度都统计次数

    • 1

    Information

    ID
    598
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    5
    Tags
    (None)
    # Submissions
    167
    Accepted
    62
    Uploaded By