Cod sursa(job #3361231)
| Utilizator | Data | 22 iulie 2026 09:40:18 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.34 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("algsort.in");
ofstream g("algsort.out");
vector<int> v;
int main()
{
int n,x;
f>>n;
v.reserve(n+5);
for(;n;n--)
{
f>>x;
v.push_back(x);
}
sort(v.begin(),v.end());
for(auto it:v)
g<<it<<' ';
return 0;
}
