Universal Cup Judging System

Universal Cup

시간 제한: 1.0 s 메모리 제한: 1024 MB 총점: 100 해킹 가능 ✓
통계

ICPC のコンテストでは複数の問題が出題され、コンテストは長時間にわたって行われます。合計で $n$ 個の正解(Accepted)提出があり、それぞれはあるチームがある問題に対して成功した試行を表します。あるチームがある問題に対して正解提出を行ったとき、そのチームはその問題を解いたと言います。なお、同じチームが同じ問題に対して複数回の正解提出を行った場合、そのうちの最初の提出のみが「その問題を初めて解いた」とみなされることに注意してください。

各提出について、以下のルールに従って風船を配るべきかどうかを判定してください:

  • スコアボード凍結前(提出時刻 $< 240$ 分):チームがある問題を初めて解いたとき、その問題に対応する風船を配る。
  • スコアボード凍結後(提出時刻 $\ge 240$ 分):チームがある問題を初めて解いたとき、そのチームがこれまでに受け取った風船の総数が $3$ 個未満である場合に限り、その問題に対応する風船を配る。

入力

入力の 1 行目には、正解提出の個数を表す整数 $n$($1 \le n \le 5\,000$)が与えられます。

続く $n$ 行には、提出が時系列順に与えられます。各提出は 3 つの整数 $a$($1 \le a \le 410$)、$b$($1 \le b \le 13$)、$c$($0 \le c < 300$)からなり、それぞれチーム ID、問題 ID、分単位の提出時刻を表します。提出時刻は広義単調増加であることが保証されます。

出力

各提出について、その問題に対応する風船を配るべきであれば問題 ID を出力し、そうでなければ $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.