Cod sursa(job #1150286)

Utilizator c0rn1Goran Cornel c0rn1 Data 22 martie 2014 19:41:39
Problema Sortare prin comparare Scor 60
Compilator cpp Status done
Runda Arhiva educationala Marime 0.36 kb
#include <stdio.h>
#include <set>
using namespace std;

int main()
{
    freopen("algsort.in", "r", stdin);
    freopen("algsort.out", "w", stdout);
    multiset <int> q;
    int n, x;
    for (scanf("%d", &n);  n--; scanf("%d", &x), q.insert(x));
    for (multiset <int>::iterator it=q.begin(); it!=q.end(); printf("%d ", *it), it++);
    return 0;
}