結果
問題 | No.2372 既視感 |
ユーザー | aaaaaaaaaa2230 |
提出日時 | 2023-07-07 22:13:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 104 ms / 2,000 ms |
コード長 | 535 bytes |
コンパイル時間 | 275 ms |
コンパイル使用メモリ | 81,996 KB |
実行使用メモリ | 76,948 KB |
最終ジャッジ日時 | 2024-07-21 18:17:46 |
合計ジャッジ時間 | 3,255 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
n,K,q = map(int,input().split()) A = [0]*(n+1) for _ in range(q): t = int(input()) if t == 1: A.append(input()) continue left = 60 record = A[-n:] TD = [] for i in range(6): t,d = input().split() TD.append([t,int(d)]) # print(record) ans = 0 for i in range(6): t,d = TD[i] if t in record: d = min(d,K) if d <= left: ans += 1 left -= d A.append(t) else: break print(ans)