嗨嗨嗨

你这代码保熟吗?(鸡叫)  •  2年前


include <bits/stdc++.h>

using namespace std; long long a[1000000];

int main() {

int n, k = 0;
cin >> n;
for (int i = 0; i < n; i++) {
	cin >> k;
	a[k]++;
}
for (int i = 0; i < 1000000; i++) {
	for (int j = 0; j < a[i]; j++) {
		if (a[i] != 0) {
			cout << i << " ";
		}
	}
}
return 0;

}


评论:

请先登录,才能进行评论