結果

問題 No.2372 既視感
ユーザー Rute
提出日時 2023-07-07 21:36:08
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 714 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-07-21 17:20:05
合計ジャッジ時間 1,960 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
N, K, Q = map(int,input().split())

q = deque([])
while Q:
    Q -= 1
    n = int(input())
    if n == 1:
        a = input()
        q.appendleft(a)
    else:
        P = []
        now = 0
        ans = 0
        for i in range(6):
            t, d = input().split()
            d = int(d)
            if t in q:
                if now + min(d, K) <= 60:
                    now += min(d, K)
                    ans += 1
            else:
                if now + d <= 60:
                    now += d
                    ans += 1
            P.append(t)
        print(ans)
        for i in range(6):
            q.appendleft(P[i])
            if len(q) > N:
                q.pop()
0