포럼
문제 COCI00176

Košarka

설명

Slavko has started to follow the NBA league. The game duration is exactly \(48\) minutes. When a game ends, the statistics are shown. Slavko has written down whenever a team scored. He is curious about how long each team was in the lead.

제약
입력 형식

The first line of input contains one integer \(N\) (\(1 \le N \le 100\)). The following \(N\) lines describe events when a team scored.

Each description consists of a team that scored, which is either \(1\) or \(2\), and a timestamp in format MM:SS (minutes:seconds), the time when the team scored. Minutes and seconds are zero padded and from ranges \([00, 47]\) and \([00, 59]\) (inclusive). The given timestamps are unique.

출력 형식

The first line of output must contain the duration that the first team was in the lead.
The second line of output must contain the duration that the second team was in the lead.
All durations should be in MM:SS format, with leading zeros.

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

Test 1

10점

None

Test 2

10점

None

Test 3

10점

None

Test 4

10점

None

Test 5

10점

None

Test 6

10점

None

Test 7

10점

None

Test 8

10점

None

Test 9

10점

None

Test 10

10점

None

예제 1
입력
1
1 20:00
출력
28:00
00:00
예제 2
입력
3
1 01:10
2 21:10
2 31:30
출력
20:00
16:30
예제 3
입력
5
1 01:10
1 02:20
2 45:30
2 46:40
2 47:50
출력
45:30
00:10
문제 정보

riseoj 작성

출처 COCI 2010/2011 Contest 5

평가 및 의견

Košarka

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

Log in to rate problems.

개별 의견

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

풀이 제출

Košarka

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