QOJ.ac

QOJ

Límite de tiempo: 1.0 s Límite de memoria: 32 MB Puntuación total: 50

#17001. 篮球

Estadísticas

Slavko 开始关注 NBA 联赛。比赛时长恰好为 48 分钟。当比赛结束时,会显示各项统计数据。Slavko 记录了每次有队伍得分的时间。他很好奇每支队伍处于领先状态的时间分别有多长。

输入格式

输入的第一行包含一个整数 $N$ ($1 \le N \le 100$)。接下来的 $N$ 行描述了队伍得分的事件。

每个描述包含得分的队伍(12)以及格式为 MM:SS(分:秒)的时间戳,即该队伍得分的时间。分钟和秒数均用前导零补齐,范围分别为 $[00, 47]$ 和 $[00, 59]$(闭区间)。给定的时间戳是唯一的。

输出格式

输出的第一行必须包含第一支队伍处于领先状态的时间。

输出的第二行必须包含第二支队伍处于领先状态的时间。

所有时间长度均应采用 MM:SS 格式,并带有前导零。

样例

输入样例 1

1
1 20:00

输出样例 1

28:00
00:00

输入样例 2

3
1 01:10
2 21:10
2 31:30

输出样例 2

20:00
16:30

输入样例 3

5
1 01:10
1 02:20
2 45:30
2 46:40
2 47:50

输出样例 3

45:30
00:10

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.