Universal Cup Judging System

Universal Cup

时间限制: 1.0 s 内存限制: 1024 MB 总分: 100 可 Hack ✓
统计

ICPC 대회에는 여러 문제가 출제되며, 대회는 오랜 시간 동안 진행됩니다. 총 $n$개의 정답(Accepted) 제출이 있으며, 각 제출은 어떤 팀이 어떤 문제에 대해 성공한 시도를 나타냅니다. 한 팀이 어떤 문제에 대해 정답 제출을 하면, 그 팀이 해당 문제를 해결했다고 말합니다. 만약 한 팀이 같은 문제에 대해 여러 번 정답 제출을 하더라도, 가장 처음 제출한 것만 그 문제를 처음으로 해결한 것으로 간주함에 유의하세요.

각 제출에 대해 다음 규칙에 따라 풍선을 지급해야 하는지 판단해야 합니다.

  • 스코어보드 프리즈 전(제출 시각 $< 240$분): 팀이 어떤 문제를 처음으로 해결했을 때, 그 문제에 해당하는 풍선을 지급합니다.
  • 스코어보드 프리즈 후(제출 시각 $\ge 240$분): 팀이 어떤 문제를 처음으로 해결했을 때, 그 팀이 지금까지 받은 풍선의 총개수가 $3$개보다 엄격히 적은 경우에만 그 문제에 해당하는 풍선을 지급합니다.

입력

입력의 첫 번째 줄에는 정답 제출의 수를 나타내는 정수 $n$ ($1 \le n \le 5\,000$)이 주어집니다.

다음 $n$개의 줄에는 제출 정보가 시간순으로 주어집니다. 각 제출은 세 정수 $a$ ($1 \le a \le 410$), $b$ ($1 \le b \le 13$), $c$ ($0 \le c < 300$)로 이루어지며, 각각 팀 번호, 문제 번호, 분 단위의 제출 시각을 나타냅니다. 제출 시각은 감소하지 않음이 보장됩니다.

출력

각 제출에 대해, 해당 문제의 풍선을 지급해야 한다면 문제 번호를 출력하고, 그렇지 않다면 $0$을 출력합니다.

예제

8
1 1 10
1 2 20
1 3 30
1 4 250
1 5 260
1 6 270
1 7 280
2 1 290
1
2
3
0
0
0
0
1

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.