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

10191번 - Clean Up 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB62524483.019%

문제

You work for the IT department of a major league baseball team. Baseball has an almost infinite number of stats—what a great job for a computer program!

You will write a program to determine who will bat 4th in the batting order. This is called the “clean-up” position and some managers use the person with the best batting average.

You will be given the roster (with their hits and at bats). The clean-up batter will be fourth and have the highest batting average.

You will also be given a series of hits and at bats which may change the best current batting average. Here are three possibilities:

  1. The clean-up batter still has the greatest average (no change!)
  2. One of the first 3 batters now has the greatest—switch positions with the clean-up hitter.
  3. One of the last 5 batters now has the greatest—insert the newest batter at the fourth position and the 4th becomes the 5th, the 5th becomes the 6th… until the old batting position is reached.

입력

The first 9 lines consist of the current roster (last name only) and their past hits and at bats. The next 9 lines consist of the hits and at bats for the next series of games (in the same order as the roster).

출력

Show the new roster with the highest batting average in the clean-up position.

제한

예제 입력 1

Uecker 15 150
Ruth 50 150
Canseco 45 150
Beltre 55 150
Cruz 51 150
Kinsler 44 150
Andrus 40 150
Moreland 35 150
Darvish 10 150
0 10
5 10
0 10
0 10
9 10
5 10
5 10
5 10
1 10

예제 출력 1

Uecker
Ruth
Canseco
Cruz
Beltre
Kinsler
Andrus
Moreland
Darvish

힌트

출처

School > PLU High School Programming Contest > PLU 2014 > Advanced 11번

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

출처

대학교 대회

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

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