Posted on
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;


int main() {
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */
    int N;
    cin >> N;
    vector<int> v;
    for (int i = 0; i < N; i++) {
        int tmp;
        cin >> tmp;
        v.push_back(tmp);
    }  
    sort(v.begin(), v.end());
    for(int i = 0; i < N; i++) {
        cout << v[i];
        if(i != N - 1) cout << " ";
    }
    cout << endl;

    return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *