解题来了!!!!!
2024-05-13 21:59:05
发布于:广东
1阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int a[10005];
int main() {
int n, x = 0;
cin >> n;
for (int i = 0; i <= 10000; i++) {
a[i] = 0;
}
for (int i = 0; i < n; i++) {
int m;
cin >> m;
if (m > x) {
x = m;
}
a[m]++;
}
for (int i = 0; i <= x; i++) {
cout << a[i] << endl;
}
return 0;
}
这里空空如也
有帮助,赞一个