Cod sursa(job #3252600)
| Utilizator | Data | 30 octombrie 2024 10:50:09 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 60 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.51 kb |
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
ifstream fin("algsort.in");
ofstream fout("algsort.out");
uint32_t n, i, x;
map<uint32_t, uint32_t> m;
int main()
{
ios_base::sync_with_stdio(false);
fin.tie(nullptr);
fout.tie(nullptr);
fin >> n;
for(i=0; i < n; i++)
{
fin >> x;
m[x]++;
}
for(auto f : m)
{
for(i=0; i < f.second; i++)
{
fout << f.first << ' ';
}
}
}
