結果
問題 | No.2372 既視感 |
ユーザー |
|
提出日時 | 2023-06-17 21:05:04 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 578 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 76,416 KB |
最終ジャッジ日時 | 2024-07-01 16:00:38 |
合計ジャッジ時間 | 2,917 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | AC * 2 RE * 24 |
ソースコード
N, K, Q = map(int, input().split())q = []for _ in range(Q):p = int(input())if p == '1':t = input()q.append(t)else:s = set()q2 = qwhile len(q2) > 0 and len(s) < N:s.add(q2[-1])q2.pop()sum = 0;ans = 0for i in range(6):t = input().split()if t[0] in s:sum += min(int(t[1]), K)else:sum += int(t[1])if sum <= 60:q.append(t[0])ans = ans + 1print(ans)