USTC 1122 Millionaire Rank List

Millionaire Rank List
Time Limit: 1000ms
Memory Limit: 131072kb
Description

In the wild universe, there lives a race of clever creature. They have high level civilization and control a lot of planets.

As we human, some of us are very rich and the public like to know who are the Top 10. As a journalist of a famous new paper, you are asked to write a program to get the top 10 list.

Input

The input contains only one test case.

The first line contains one integer N (10 <= N <= 1,000,000), which means there are N rich people in the race. The following N lines each contains a integer Mi (Mi >= 0), which means the money of the i-th person.

But as they are universal millionaires, they are very rich, which means the amount of their money can be as large as 1025.

Note that Mi may have preceding zeros.

Output

Output 10 lines, containing the money of the richest 10 people in descending order. Delete the preceding zeros if they once have.

Sample Input
11
1
2
3
4
5
6
7
8
9
10
15
Sample Output
15
10
9
8
7
6
5
4
3
2
来源:34th ACM/ICPC Asia Regional, Hefei, Preliminary
解题:
大数排序问题。对于涉及到大数的,一般用c语言读取比较快。排序方法的选择,只需要排列前十个。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值