結果
問題 | No.2372 既視感 |
ユーザー |
![]() |
提出日時 | 2023-07-10 10:37:26 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 92 ms / 2,000 ms |
コード長 | 632 bytes |
コンパイル時間 | 427 ms |
コンパイル使用メモリ | 82,300 KB |
実行使用メモリ | 76,724 KB |
最終ジャッジ日時 | 2024-09-12 23:39:11 |
合計ジャッジ時間 | 2,720 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
N, K, Q = map(int, input().split())A = []for _ in range(Q):q = int(input())if q == 1:A.append(input())elif q == 2:M = len(A)B = A[max(0, M - N):]ans = 0time = 0for i in range(6):t, d = input().split()d = int(d)if t in B:if time + min(d, K) <= 60:ans += 1A.append(t)time += min(d, K)else:if time + d <= 60:ans += 1A.append(t)time += dprint(ans)