You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
const int N = 1010;
|
|
int a[N];
|
|
int n, m, tmp;
|
|
|
|
int main() {
|
|
cin >> n >> m;
|
|
for (int i = 0; i < m; i++) {
|
|
cin >> tmp;
|
|
a[tmp]++;
|
|
}
|
|
for (int i = 1; i <= n; i++) //号
|
|
for (int j = 0; j < a[i]; j++) //次数
|
|
cout << i << ' ';
|
|
return 0;
|
|
} |