HUSTOJ
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
ContestProblemSetList
Login
Register
Problem E: 【排序】有趣的桶排序
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:296
Solved:147
Return to contest
Submit
Submit Record
ShowOff!
Description
已知一组范围在0~1000的数据(如:9,501,2,7,7),你有没有什么好方法编写一段程序,将数据从大到小输出呢?
Input
第一行输入n
第二行输入n个数,每个数用空格隔开
Output
数据从大到小输出
Sample Input
Copy
8 12 42 8 9 32 20 30 40
Sample Output
Copy
42 40 32 30 20 12 9 8
Source/Category
排序
桶排序
⭐⭐