Cod sursa(job #3326732)
| Utilizator | Data | 30 noiembrie 2025 11:24:58 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.36 kb |
#include <bits/stdc++.h>
const int MAXN = 500000;
using namespace std;
int v[MAXN + 5];
int main() {
ifstream fin( "algsort.in" );
ofstream fout( "algsort.out" );
int n;
fin >> n;
for ( int i = 0; i < n; i++ ) {
fin >> v[i];
}
sort ( v, v + n );
for ( int i = 0; i < n; i++ ) {
fout << v[i] << ' ';
}
return 0;
}