Notice
Recent Posts
Recent Comments
Link
«   2026/06   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Archives
Today
Total
관리 메뉴

dh-winternagi 님의 블로그

(2751) 수 정렬하기 2 본문

백준 (C++)/Solve

(2751) 수 정렬하기 2

dh-winternagi 2026. 4. 13. 22:45

https://www.acmicpc.net/problem/2751

단계별로 풀어보기

13단계(정렬) 4번째

 

 

 

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() 
{
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  
  int n;
  
  cin >> n;
  
  vector<int> v(n);
  
  for(int i=0;i<n;i++)  cin >> v[i];
  
  sort(v.begin(), v.end());
  
  for(int i=0;i<n;i++)  cout << v[i] << "\n";
  
  return 0;
}

'백준 (C++) > Solve' 카테고리의 다른 글

(1427) 소트인사이드  (0) 2026.04.13
(10989) 수 정렬하기 3  (0) 2026.04.13
(25305) 커트라인  (0) 2026.04.13
(2587) 대표값2  (0) 2026.04.13
(2750) 수 정렬하기  (0) 2026.04.13