dh-winternagi 님의 블로그
(1427) 소트인사이드 본문
https://www.acmicpc.net/problem/1427
단계별로 풀어보기
13단계(정렬) 6번째

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
int n;
cin >> n;
vector<int> v(10);
while(n){
v[n%10]++;
n/= 10;
}
for(int i=9;i>=0;i--){
for(int j=0;j<v[i];j++) cout << i;
}
return 0;
}'백준 (C++) > Solve' 카테고리의 다른 글
| (11651) 좌표 정렬하기 2 (0) | 2026.04.14 |
|---|---|
| (11650) 좌표 정렬하기 (0) | 2026.04.13 |
| (10989) 수 정렬하기 3 (0) | 2026.04.13 |
| (2751) 수 정렬하기 2 (0) | 2026.04.13 |
| (25305) 커트라인 (0) | 2026.04.13 |
