Cod sursa(job #1451797)
Utilizator | Data | 18 iunie 2015 15:32:21 | |
---|---|---|---|
Problema | Sortare prin comparare | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.41 kb |
#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> V;
int main()
{
freopen("algsort.in","r",stdin);
freopen("algsort.out","w",stdout);
scanf("%d",&N);
V.resize(N);
for(int i = 0; i < N; ++i)
scanf("%d",&V[i]);
make_heap(V.begin(),V.end());
sort_heap(V.begin(),V.end());
///for(auto it : V)
/// printf("%d ",it);
return 0;
}