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

Coci

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

의견: 0

설명

\(3^{rd}\) round, November \(29^{th}\), 2014
The \(3^{rd}\) round of COCI is already here! In order to bet on predict the scores, we have assumed the following:
• If contestant A scored strictly more points than contestant B in each of the first two rounds, then in the
third round A will score at least an equal amount of points as B.
Of course, in each round (including this one, the 3rd one) it is possible to score from 0 to 650 points. On the
total ranking list, contestants are sorted descending according to the sum of points from all three rounds.
The contestants with an equal sum share the same place and the next contestant gets the realistic following place.
For example, contestants with sums equal to 1000, 1000, 900, 900 and 800 points win places 1., 1., 3., 3. and 5.,
respectively.
For each of the N contestants, we know the number of points scored in the first and second round. Given the
aforementioned assumption, determine the highest and lowest place each contestant can get on the total ranking
list after three rounds of COCI.

제약
입력 형식

The first line of input contains an integer N (1 ⩽N ⩽500 000), the number of contestants.
Each of the following N lines contains two integers from the interval [0, 650]: the number of points each contestant
won in the first and second round.

출력 형식

For each contestant, in the order given in the input, output two integers per line: the required highest and lowest
place they can get on the total ranking list.

예제 1
입력
5
250 180
250 132
220 123
132 194
220 105
10
650 550
550 554
560 512
610 460
610 456
650 392
580 436
650 366
520 456
490 456
출력
output
1 3
1 3
3 5
1 5
3 5
1 4
1 8
2 8
2 7
2 9
1 10
4 10
1 10
5 10
5 10
문제 정보

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

출처 COCI 2014/2015 Contest 3

평가 및 의견

Coci

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

Log in to rate problems.

개별 의견

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

풀이 제출

Coci

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