Beakjoon/counting sort (1) 썸네일형 리스트형 [백준] 10989번 수 정렬하기 3 (C++) - counting sort 문제 https://www.acmicpc.net/problem/10989 10989번: 수 정렬하기 3 첫째 줄에 수의 개수 N(1 ≤ N ≤ 10,000,000)이 주어진다. 둘째 줄부터 N개의 줄에는 수가 주어진다. 이 수는 10,000보다 작거나 같은 자연수이다. www.acmicpc.net 코드 #include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; int array[10001] = {0}; cin >> n; for(int i=0; i> index; array[index]++; } for(int i=0; i 이전 1 다음