Cod sursa(job #3252602)
| Utilizator | Data | 30 octombrie 2024 10:52:08 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 60 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.45 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;
set<pair<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.insert(make_pair(x, i));
}
for(auto f : m) fout << f.first << ' ';
}
