From fd52fbe6174e306b227d68e36e529a8c0062b3cd Mon Sep 17 00:00:00 2001 From: MCC Date: Thu, 13 Jun 2019 19:26:09 +0900 Subject: [PATCH] =?UTF-8?q?feat:=2019=EB=85=84=206=EC=9B=94=2013=EC=9D=BC?= =?UTF-8?q?=20PS=20=EC=86=94=EB=A3=A8=EC=85=98=20=EC=97=85=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 백준 - 수 정렬하기 3(counting sort) --- 190613/jake/10989.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 190613/jake/10989.cpp diff --git a/190613/jake/10989.cpp b/190613/jake/10989.cpp new file mode 100644 index 0000000..40149f0 --- /dev/null +++ b/190613/jake/10989.cpp @@ -0,0 +1,22 @@ +#include +using namespace std; +int N; +int store[10001] {0,}; +int main() +{ + ios_base::sync_with_stdio(false); + cin.tie(NULL); + cin >> N; + int t; + while(N--){ + cin >> t; + store[t]++; + } + for(int i = 1; i < 10001; ++i){ + while(store[i]--){ + cout << i << "\n"; + } + } + return 0; +} +