結果
問題 | No.2372 既視感 |
ユーザー |
![]() |
提出日時 | 2023-07-07 22:03:10 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 51 ms / 2,000 ms |
コード長 | 553 bytes |
コンパイル時間 | 692 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-21 18:04:36 |
合計ジャッジ時間 | 2,392 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
from collections import dequeN,K,Q = map(int,input().split())A = deque([])for i in range(Q):q = int(input())if q == 1:s = input()A.append(s)if len(A) > N:A.popleft()else:ans = 0T = 0f = 1X = []for i in range(6):t,dd = map(str,input().split())d = int(dd)if t in A:d = min(d,K)if T + d > 60:f = 0if f:T += dans += 1X.append(t)for x in X:A.append(x)if len(A) > N:A.popleft()print(ans)