Cod sursa(job #726799)
| Utilizator | Data | 27 martie 2012 15:31:19 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 60 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.43 kb |
#include <iostream>
#include <fstream>
#include <set>
#define nmax 500005
#define ll int
using namespace std;
ifstream in("algsort.in");
ofstream out("algsort.out");
int n;
multiset<ll> h;
multiset<ll>::iterator it;
int main()
{ ll x;
in>>n;
for ( int i=1; i<=n; ++i )
{
in>>x;
h.insert(x);
}
for ( it=h.begin(); it != h.end(); ++it )
out<<*it<<" ";
return 0;
}
