Pagini recente » preoni2008-runda3-9 | rosiimici | Istoria paginii runda/hlo_cj_av_l2/clasament | Cod sursa (job #3283756) | Cod sursa (job #2756095)
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
ifstream cin("algosort.in");
ofstream cout("algosort.out");
int N;
cin >> N;
vector<unsigned int> array(N);
for(int i = 0; i < N; ++i)
cin >> array[i];
stable_sort(array.begin(), array.end());
for(int i = 0; i < N; ++i)
cout << array[i] << " ";
cin.close();
cout.close();
return 0;
}