提交时间:2024-08-19 23:37:08

运行 ID: 168186

#include <algorithm> #include <iostream> int main() { using namespace std; int n; cin >> n; int vec[n]; if (n> 100000) {return 1;} for (int i = 0; i < n; ++i) { cin >> vec[i]; } sort(vec, vec+n); for (int n : vec) { cout << n << ' '; } cout << '\n'; return 0; }