Cod sursa(job #2099889)

Utilizator miguelMihail Lavric miguel Data 4 ianuarie 2018 19:55:19
Problema Sortare prin comparare Scor 100
Compilator cpp Status done
Runda Arhiva educationala Marime 0.56 kb
#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
#define rc(x) return cout<<x<<endl,0
#define pb push_back
#define dbg(x) cout << #x << '=' << x << '\n';
#define ll long long
#define sz size()
#define pb push_back
const ll mod = 1e9 + 7;
vector <ll> v; int x, n;

int32_t main(){
    ios_base :: sync_with_stdio(0); cin.tie(); cout.tie();
    ifstream fin("algsort.in");
    ofstream fout("algsort.out");
    fin>>n;
    for(int i=0; i<n; i++){fin>>x; v.pb(x);}
    sort(v.begin(), v.end());
    for(int i=0; i<v.sz; i++) fout<<v[i]<<" ";

}