Skip to content

Commit 7008ab9

Browse files
authored
[Week01] BOJ 2750: 수 정렬하기 (#3)
1 parent 36ca1a8 commit 7008ab9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include <iostream>
2+
#include <algorithm>
3+
#include <vector>
4+
5+
using namespace std;
6+
7+
int n;
8+
vector<int> v;
9+
int main() {
10+
ios::sync_with_stdio(false);
11+
cin.tie(NULL); cout.tie(NULL);
12+
13+
cin >> n;
14+
for (int i = 0; i < n; i++) {
15+
int x;
16+
cin >> x;
17+
v.push_back(x);
18+
}
19+
20+
sort(v.begin(), v.end());
21+
22+
for (int num : v) {
23+
cout << num << '\n';
24+
}
25+
26+
return 0;
27+
}

0 commit comments

Comments
 (0)