Pagini recente » Rating Isciuc Iustin - Constantin (Iustin01) | Cod sursa (job #755008) | Cod sursa (job #1133718) | Cod sursa (job #2054580) | Cod sursa (job #1769746)
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <limits>
using namespace std;
ifstream in("algsort.in");
ofstream out("algsort.out");
int main()
{
vector<int> v;
int n,x;
in >>n;
for(int i = 0 ; i< n ; i++)
in>>x,v.push_back(x);
sort(v.begin(),v.end());
for(int i = 0 ; i <n ; i++)
out<<v[i]<<" ";
return 0;
}