Cod sursa(job #3362250)
| Utilizator | Data | 4 august 2026 20:26:40 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 60 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.36 kb |
#include<bits/stdc++.h>
using namespace std;
ifstream fin("algsort.in");
ofstream fout("algsort.out");
multiset <int> s; ///tine datele ordonat, permite duplicate ex 1 2 3 3 4 5 6 7 8 8
int main()
{
int n,x;
fin>>n;
for(;n;n--)
{
fin>>x;
s.insert(x);
}
for(auto it:s)
{
fout<<it<<" ";
}
}
