結果
問題 |
No.2372 既視感
|
ユーザー |
![]() |
提出日時 | 2023-07-07 21:32:38 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 694 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 82,308 KB |
実行使用メモリ | 72,148 KB |
最終ジャッジ日時 | 2024-07-21 17:15:45 |
合計ジャッジ時間 | 2,449 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 16 |
ソースコード
import sys input = sys.stdin.readline from collections import * N, K, Q = map(int, input().split()) S = deque() for _ in range(Q): flag = int(input()) if flag == 1: S.append(input().rstrip()) else: t, d = [0] * 6, [0] * 6 for i in range(6): t[i], d[i] = input().split() ans = 0 now = 0 for i in range(6): if t[i] in S: now += min(int(d[i]), K) else: now += int(d[i]) if now <= 60: ans += 1 S.append(t[i]) while len(S) > N: S.popleft() print(ans)