Cod sursa(job #2282334)
| Utilizator | Data | 13 noiembrie 2018 17:05:56 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.38 kb |
#include <iostream>
#include <fstream>
#include <algorithm>
using namespace std;
ifstream fin("algsort.in");
ofstream fout("algsort.out");
#define NMax 500010
int n;
int a[NMax];
void citire();
int main(){
citire();
sort(a, a + n);
for(int i = 0; i < n; i++) fout << a[i] << ' ';
}
void citire(){
fin >> n;
for(int i = 0; i < n; i++) fin >> a[i];
}
