Cod sursa(job #2184989)

Utilizator rnqftwcalina florin daniel rnqftw Data 24 martie 2018 12:26:36
Problema Sortare prin comparare Scor 100
Compilator cpp Status done
Runda Arhiva educationala Marime 0.38 kb
#include<bits/stdc++.h>

using namespace std;
ifstream in("algsort.in");
ofstream out("algsort.out");
int main()
{

    vector<long long> s;
    int n;
    in>>n;
    int x;
    for(int i=0;i< n;i++){
        in>>x;
        s.push_back(x);
    }
    sort(s.begin(),s.end());

    for(auto it:s){
        out<<it<<" ";
    }

    in.close();
    out.close();
}