Algorithm
[BOJ][C++] 10989 수 정렬하기 3
도라프
2022. 7. 3. 21:55
https://www.acmicpc.net/problem/10989
#include <iostream>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int N;
cin >> N;
int input[10001]={0};
for(int i=0;i<N;i++) {
int in;
cin >> in;
input[in]+=1;
}
for (int i=1; i<10001;i++) {
for (int j=0; j<input[i];j++) {
cout << i << '\n';
}
}
}