사생활 보호 설정
https://gamjia.tistory.com
Updated News
Mini Rooms
답글수 [0]
What Friends Say
한마디로 표현해봐~
1촌평 관리
10989번 수 정렬하기 3
GamJia 2023. 4. 3. 09:08
단계별로 풀어보기 - 정렬 - 3단계
https://www.acmicpc.net/problem/10989
#include <iostream> using namespace std; int main(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin>>N; int arr[10001]={0}; for(int i=0;i<N;i++) { int count; cin>>count; arr[count]++; } for(int i=1;i<10001;i++) { for(int j=0;j<arr[i];j++) { cout<<i<<"\n"; } } return 0; }
🔊맨 윗부분 작성 안하면
시간이 초과된다..