#P339. 【例58.2】 序列处理
【例58.2】 序列处理
Description
Given a sequence of integers, output their sum, maximum value, minimum value, and the sequence sorted in descending order (with duplicates removed).
Input Format
The first line contains an integer ().
The second line contains integers ().
Output Format
The first line outputs an integer representing the sum.
The second line outputs an integer representing the maximum value.
The third line outputs an integer representing the minimum value.
The fourth line outputs a sequence of integers separated by spaces, representing the sequence sorted in descending order (with duplicates removed).
Sample
8
8 5 1 9 2 6 2 639
9
1
9 8 6 5 2 1
Related
In following homework: