Cod sursa(job #3294233)
Utilizator | Data | 20 aprilie 2025 03:52:15 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.42 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("algsort.in");
ofstream fout("algsort.out");
int x;
vector<int> v;
int main()
{
ios::sync_with_stdio(false);
fin.tie(nullptr);
fin >> x;
while(fin >> x)
{
v.push_back(x);
}
sort(v.begin(), v.end());
for(int i: v)
{
fout << i << " ";
}
fin.close();
fout.close();
return 0;
}