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

31487번 - Programming-trampoline-athlon! 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB143836255.357%

문제

Programming competitions are fun and exciting. Programming should be an Olympic sport! At least, this is what we believe. However, when we suggested this to some of our friends, they did not seem to share our excitement. So, we decided to suggest a combined sport that will be more interesting to watch. Programming-trampoline-athlon! (we are still working on the name.)

The idea is as follows. This is a team sport, where each team comprises of 3ドル$ members. The team has at its disposal 1ドル$ hour, 1ドル$ computer, and 1ドル$ trampoline. At all times, there must be at most one team member using the computer and at least one team member jumping the trampoline. At the beginning of the competition, the team is given 6 programming problems, and 6ドル$ trampoline elements (exercises). The team decides how to partition the trampoline elements between its members, such that each team member has to perform 2ドル$ of the given elements on the trampoline. The programming tasks are solved cooperatively by the team members, but no one member can spend more than 25ドル$ minutes on the computer in total. The scoring is comprised of two parts, which are added together:

  • The programming score ranges between 0ドル$ and 60ドル$. The team receives 10ドル$ points for every correctly solved problem.
  • The trampoline score ranges between 0ドル$ and 40ドル$. Each of the 6ドル$ trampoline elements receives a score from the judges that ranges between 0ドル$ and 10ドル$. The final trampoline execution score is determined by dropping the highest and lowest of the 6ドル$ scores, and then adding up the remaining 4ドル$ scores.

Before we pitch this new sport to the International Olympic Committee, we want everything to be ready in order to show them just how serious we are. Thus, each team should receive a medal when no more than two other teams obtained a strictly higher score. However, in order to cope with a recent shortage of medals, the jury was instructed to make sure that there would be no more than 1ドル,円 000$ teams deserving a medal. We ask you to write a program that determines the medallists, given the performance of the different teams.

입력

The first line contains the number $N$ of competing teams. Then follow $N$ lines. Each of these lines describes a team and contains space-separated values $C,ドル $P,ドル $E_1,ドル $E_2,ドル $E_3,ドル $E_4,ドル $E_5,ドル $E_6$; $C$ is a five-letter code used to identify the team, $P$ is an integer specifying the number of problems the team solved, and $E_i$ is an integer specifying the execution score of trampoline element number i.

출력

The output should contain $M$ lines, where $M$ is the number of medallists. Each line should represent a medallist team, by containing two space-separated values $C$ and $S,ドル where $C$ is the team code and $S$ is the total score of the team. Medallist teams should be listed by decreasing total score and, in case of ties, by input order.

제한

  • 3ドル \le N \le 100,円 000$
  • 3ドル \le M \le 1,円 000$
  • $C$ consists of five uppercase English letters;
  • 0ドル \le P \le 6$
  • 0ドル \le E_i \le 10$ for all 1ドル \le i \le 6$
  • different teams always have different team codes.

예제 입력 1

5
EMAIL 3 5 6 7 8 9 10
CRASH 2 7 1 8 2 8 1
MOUSE 4 0 9 3 9 1 7
SWERC 6 3 1 4 1 5 9
PAINT 6 0 0 0 0 0 10

예제 출력 1

SWERC 73
EMAIL 60
MOUSE 60
PAINT 60

예제 입력 2

4
CRAZY 4 0 2 4 6 8 10
JAZZY 2 9 9 9 9 9 9
JUICY 3 2 9 10 9 10 1
FUZZY 5 0 1 1 2 3 5

예제 출력 2

CRAZY 60
JUICY 60
FUZZY 57

힌트

출처

ICPC > Regionals > Europe > Southwestern European Regional Contest > SWERC 2023-2024 F번

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

출처

대학교 대회

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

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