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