Cod sursa(job #1934985)
| Utilizator | Data | 21 martie 2017 22:18:15 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.43 kb |
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;
ifstream f("algsort.in");
ofstream g("algsort.out");
unsigned long long x;
vector < unsigned long long > v;
int n;
int main()
{
f>>n;
for(;n;n--)
{
f>>x;
v.push_back(x);
}
sort(v.begin(),v.end());
int l=v.size();
for(int k=0; k<l; k++)
g<<v.at(k)<<" ";
return 0;
}
