結果
問題 |
No.2372 既視感
|
ユーザー |
|
提出日時 | 2023-06-17 23:08:01 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 585 bytes |
コンパイル時間 | 217 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 77,764 KB |
最終ジャッジ日時 | 2024-07-01 16:00:49 |
合計ジャッジ時間 | 3,017 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 WA * 3 |
ソースコード
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 = q.copy() while len(q2) > 0 and len(s) < N: s.add(q2[-1]) q2.pop(-1) sum = 0;ans = 0 for 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 + 1 print(ans)