結果
| 問題 | No.2372 既視感 | 
| コンテスト | |
| ユーザー |  ntuda | 
| 提出日時 | 2025-02-18 22:22:35 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 103 ms / 2,000 ms | 
| コード長 | 550 bytes | 
| コンパイル時間 | 1,273 ms | 
| コンパイル使用メモリ | 82,432 KB | 
| 実行使用メモリ | 76,672 KB | 
| 最終ジャッジ日時 | 2025-02-18 22:22:39 | 
| 合計ジャッジ時間 | 3,787 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 26 | 
ソースコード
N,K,Q = map(int,input().split())
B = []
for q in range(Q):
    c = int(input())
    if c == 1:
        B.append(input())
    else:
        tim = 60
        ret = 0
        A = []
        TD = [list(input().split()) for _ in range(6)]
        for t,d in TD:
            d = int(d)
            NA = len(B)
            if t in B[max(0,NA-N):]:
                d = min(d,K)
            if tim - d >= 0:
                tim -= d
                A.append(t)
                ret += 1
            else:
                break
        B += A
        print(ret)
            
            
            
        