結果
| 問題 | No.2372 既視感 | 
| コンテスト | |
| ユーザー |  ニックネーム | 
| 提出日時 | 2023-07-07 21:34:22 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 49 ms / 2,000 ms | 
| コード長 | 429 bytes | 
| コンパイル時間 | 96 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-21 17:17:59 | 
| 合計ジャッジ時間 | 2,089 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 | 
ソースコード
from collections import deque
n,k,q = map(int,input().split())
a = deque()
for _ in range(q):
    if int(input())==1:
        a.append(input())
        if len(a)>n: a.popleft()
    else:
        s = c = 0
        for _ in range(6):
            t,d = input().split(); d = int(d)
            if t in a: d = min(d,k)
            if s+d<=60: a.append(t); c += 1
            s += d
        while len(a)>n: a.popleft()
        print(c)
            
            
            
        