๋ฌธ์
์ฝ๋
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
int T;
cin >> T;
vector<int>map;
while (T--) {
int number;
cin >> number;
map.push_back(number);
}
sort(map.begin(), map.end(), greater<int>());
for (int i : map) {
cout << i << "\n";
}
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 1238๋ฒ - ํํฐ (0) | 2021.11.02 |
---|---|
[๋ฐฑ์ค,c++] 12015๋ฒ - ๊ฐ์ฅ ๊ธด ์ฆ๊ฐํ๋ ๋ถ๋ถ ์์ด2 (0) | 2021.11.02 |
[๋ฐฑ์ค,c++] 1197๋ฒ - ์ต์ ์คํจ๋ ํธ๋ฆฌ (0) | 2021.11.02 |
[๋ฐฑ์ค,c++] 11866๋ฒ - ์์ธํธ์ค ๋ฌธ์ 0 (0) | 2021.11.02 |
[๋ฐฑ์ค,c++] 1182๋ฒ - ๋ถ๋ถ ์์ด์ ํฉ (0) | 2021.11.01 |
[๋ฐฑ์ค,c++] 1181๋ฒ - ๋จ์ด์ ๋ ฌ (0) | 2021.10.31 |
๋๊ธ