感觉此题略水
#include<bits/stdc++.h>
using namespace std;
void bucketsort(int n)
{
int bucket[110];
memset(bucket,0,sizeof(bucket));
for(int i=0; i<n; i++)
{
int t;
scanf("%d",&t);
if(t>100)
t=100;
bucket[t]++;
}
for(int i=0;i<105;i++)
if(bucket[i])
printf("%d %d\n",i,bucket[i]);
}
int main()
{
int n;
scanf("%d",&n);
bucketsort(n);
}