#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int a[100+5];
int main() {
int n;
while(~scanf("%d", &n)) {
memset(a,0,sizeof(a));
while(n--) {
int x;
scanf("%d", &x);
if(x>100)
x=100;
a[x]++;
}
for(int i=0;i<=100;i++)
if(a[i])
printf("%d %d\n", i, a[i]);
}
return 0;
}
数据结构实验之排序三:bucket sort
最新推荐文章于 2024-06-21 18:55:16 发布