Coding Test - cpp/Sort
[백준 10989: 수 정렬하기3] - C++
에드윈H
2021. 2. 16. 09:40
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
int n;
int input;
cin.tie(NULL);
ios::sync_with_stdio(false);
cin >> n;
int arr[10001] = { 0 };
for (int i = 0; i < n; i++)
{
cin >> input;
arr[input] += 1;
}
for (int i = 1; i <= 10000; i++)
{
for (int j = 0; j < arr[i]; j++)
{
cout << i << "\n";
}
}
return 0;
}