USTC 1122:Millionaire Rank List
2538 단어 너 희 는 나 에 게 w 를 빼 앗 지 마라.ACMUSTC
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 이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
hdu 컴퓨터 대학 대학생 프로 그래 밍 경기 2015 '11 1002 동전 투입 세탁기쌓 인 옷 의 수량 이 a 보다 많 고 b 보다 적 을 때 그 는 바로 모두 세탁기 에 세탁 을 하고 동전 2 개 를 투입 한다.쌓 인 옷 의 수량 이 b 보다 많 고 c 보다 적 을 때 그 는 즉시 모두 세탁기 에...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.