Logo
(追記) (追記ここまで)

9787번 - Olympic Games Ranking 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB112483944.828%

문제

The Olympic Games is the most well-known sporting event in the world. The ranking of participating nations is done by sorting their medals. Firstly, the nations are sorted by the number of gold medals that their athletes won. Secondly, if the number of gold medals is equal, the number of silver medals is taken into consideration and then the number of bronze medals. If nations are still tied, equal ranking is given and they are listed alphabetically by the country code. The next rank will skip the equal rank(s).

You have to write a program for generating the Olympic Games medal ranking from an unordered medal list.

입력

The input is an un-ordered list of nations and their medals. Each nation is described in a line including the country code (3-letter code), number of gold medals, silver medals and bronze medals respectively.

The number of nations does not exceed 250.

출력

Print out the resulted ranking with the rank numbers and total medals as shown in the sample output.

제한

예제 입력 1

THA 2 2 0
MAS 0 1 0
CHN 51 21 28
NED 7 5 15
POL 3 6 1
VEN 0 0 1
USA 36 38 36
MGL 2 2 0
EGY 0 0 1

예제 출력 1

1 CHN 51 21 28 100
2 USA 36 38 36 110
3 NED 7 5 15 27
4 POL 3 6 1 10
5 MGL 2 2 0 4
5 THA 2 2 0 4
7 MAS 0 1 0 1
8 EGY 0 0 1 1
8 VEN 0 0 1 1

힌트

출처

ICPC > Regionals > Asia Pacific > Thailand > Thailand Southern Programming Contest > Thailand Southern Programming Contest 2012 F번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /