🏕️ PS (BOJ)
[BOJ][C++] 백준 11931번: 수 정렬하기 4
선달
2023. 1. 11. 17:59
반응형
// Authored by : seondal
// Co-authored by : -
// #include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
ios_base::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(), greater<>{});
for(int i=0; i<n; i++)
cout << v[i] << "\n";
return 0;
}
/*
*/
반응형