RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00620

Med

Unrated 레이팅 미적용
난이도
1s
시간 제한
512MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

The moment has finally arrived. Not only is it the last round of COCI this season, it is
also the last round of CO\(CB - th\)e Croatian Open Competition in Beekeeping. Not many
people know that the two competitions share the same scoring system. More precisely,
both competitions consist of six rounds, the points on each round are between 0 and 500,
and the scores of the individual rounds are summed up for the final tally.
After the six rounds, the competitors are ranked based on their total score over the six
rounds. If two competitors have the same score, the one with the lexicographically smaller
name appears sooner on the ranking. No two competitors have the same name.
The beekeepers are very impatient and they would like to know what their final ranking will be in advance.
Each beekeeper wants to know their best and worst possible positions on the final ranking. Unlike skilled
COCI programmers, the beekeepers don’t know how to code. Therefore, they are asking you to determine
the range of positions they could occupy after the sixth round.

제약

Subtask 1 (10 points): \(n = 2\)

Subtask 2 (40 points): No additional constraints.

입력 형식

The first line contains a positive integer \(n\) (\(1 \le n \le 500\)), the number of beekeepers.
Each of the following \(n\) lines contains the name of a beekeeper \(s@@RISE_MATH_BLOCK_0@@i\)| ≤10) and five numbers
\(b\)\(i\)1, b\(i\)2, b\(i\)3, b\(i\)4, b\(i\)5 from the range [0, 500], the scores of the \(i-th\) beekeeper on the first five rounds of COCB.
The names of the beekeepers are distinct and are made up of at most ten lowercase letters of the latin
alphabet.

출력 형식

Print \(n\) lines. In the \(i-th\) line print the best and worst possible position on the ranking for the \(i-th\)
beekeeper.

서브태스크
서브태스크점수설명

1

10점

\(n = 2\)

2

40점

No additional constraints.

예제 1
입력
3
pavel 120 200 300 400 500
keko 150 400 300 200 100
bartol 470 120 90 93 189
출력
1 2
1 3
2 3
예제 2
입력
2
ante 275 275 275 275 275
mate 25 100 175 250 325
출력
1 1
2 2
설명

Clarification of the second example:
So far, Ante has a sum of 1375, and Mate has 875. If Mate were to win 500 points on the last round,

and Ante 0, the result would be tied and they would both have 1375 points. However, since Ante is
lexicographically smaller than Mate, Ante will still be ahead on the ranking.

문제 정보

생성자가 기록되지 않았습니다.

출처 COCI 2021/2022 Contest 6

평가 및 의견

Med

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Med

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8