結果
問題 | No.2372 既視感 |
ユーザー |
|
提出日時 | 2023-07-11 09:43:00 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 94 ms / 2,000 ms |
コード長 | 577 bytes |
コンパイル時間 | 172 ms |
コンパイル使用メモリ | 82,188 KB |
実行使用メモリ | 76,696 KB |
最終ジャッジ日時 | 2024-09-13 00:03:55 |
合計ジャッジ時間 | 2,771 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
N,K,Q = map(int, input().split())A = []for t in range(Q):qu = int(input())if qu == 1:A.append(input())# print(A[max(0,len(A)-N):])else:B = []for i in range(6):B.append(list(input().split()))time = 0res = 0for n, t in B:t = int(t)if n in A[max(0,len(A)-N):]:time += min(t, K)else:time += tif time <= 60:res += 1print(res)for n,t in B[:res]:A.append(n)