USTC 1122:Millionaire Rank List

전송 문:http://acm.ustc.edu.cn/ustcoj/problem.php?id=1122
Time Limit: 1000msMemory 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 10^25.[강박 증 은 말씀 드 리 지만 여기에 제 가 부 호 를 하나 넣 었 어 요.
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
 
 
제목:최대 10 개 수 를 찾 아 라
구덩이:they are VERY rich, which means the amount of their money can be as large as 10^25,그리고 선도 0 도 있 습 니 다.
사고방식:대수+부분 정렬
 
뭐?오늘 수업 시간 에 선생님 께 서 이 08 년 의 허 페 이 경기 구[약교 전문 경기장 2333[final 의 학 교 는 참가 할 수 없습니다.제목 이 저 를 귀 엽 게 하 는 것 은 어떻게 된 일 인지 모 르 겠 습 니 다!그래서 굴 러 왔어요.
지난 5 일 샤 오 광 을 찾 아가 이 야 기 를 나 눴 는데 최근 에 미 션 이 내 려 왔 습 니 다.지금 은 3 층 구조 가 좀 혼 란 스 럽 지만 다행히 지 을 수 있 는 지경 입 니 다.15 일이 바로 다음 주 5 만 전 입 니 다.정말 설 레 네요.또 동료 들 을 만 날 수 있 겠 군!나 보다 훨씬 작은 코스 터 를 또 만 나 게 돼 서 너무 떨 려 요 ㅋ ㅋ ㅋ ㅋ 초등학생 이 나 보고 작다 고 ㅋ ㅋ ㅋ ㅋ ㅋ ㅋ ㅋ ㅋ ㅋ
 참고 로!오늘 침실 에서 산 세탁기 가 도 착 했 습 니 다.정말 좋 습 니 다!!나 와 죽 죽 은 천신만고 끝 에.....................................................................
 
내 가 헛소리 하 는 거 재 밌 어?
 
#include
#include
#include
#include
using namespace std;
string m[1000000];
bool cmp(string a,string b)
{
	int i,lenA=a.length(),lenB=b.length();
	if(lenA!=lenB)
		return lenA>lenB;
	for(i=0;ib[i];
	}
}
int main()
{
	int n,i,cnt;
	char temp[30];
	scanf("%d",&n);
	for(i=0;i

좋은 웹페이지 즐겨찾기