Cod sursa(job #294171)
| Utilizator | Data | 2 aprilie 2009 12:55:27 | |
|---|---|---|---|
| Problema | Sortare prin comparare | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.42 kb |
#include<cstdio>
#include<algorithm>
#include<vector>
#define IN freopen("algsort.in","r",stdin)
#define OUT freopen("algsort.out","w",stdout)
using namespace std;
vector <int> v;
int n;
int main()
{
int x;
IN;OUT;
scanf("%d",&n);
while(n--)
{
scanf("%d",&x);
v.push_back(x);
}
sort(v.begin(),v.end());
for(vector<int>::iterator it=v.begin() ; it!=v.end() ; ++it )
printf("%d ",*it);
}
