Cod sursa(job #1140664)
Utilizator | Data | 12 martie 2014 10:11:39 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 60 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.39 kb |
#include <fstream>
#include <set>
using namespace std;
multiset <int> s;
multiset <int> :: iterator it;
int n, i, x;
int main(){
ifstream fin("algsort.in");
ofstream fout("algsort.out");
fin>>n;
for (i=1;i<=n;i++) {
fin>>x;
s.insert(x);
}
for (it = s.begin(); it != s.end(); it++)
fout<<*it<<" ";
return 0;
}