Sort P25261


Statement
 

pdf   zip

thehtml

Write a program that reads a sequence of lists of numbers, and prints each list sorted in decreasing order.

Input

Input consists of a sequence of lists of numbers, each one composed of a natural n followed by n integer numbers.

Output

Your program must print each line sorted in decreasing order, with the numbers separated by a space.

Observation

Use the procedure |sort()| from the library |<algorithm>|.

Public test cases
  • Input

    8  1 -2 3 -4 5 -6 7 -8
    4  0 1 1 0
    

    Output

    7 5 3 1 -2 -4 -6 -8
    1 1 0 0
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions
    C++ Perl Python