結果

問題 No.2372 既視感
ユーザー prd_xxxprd_xxx
提出日時 2023-07-07 21:28:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 569 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 78,328 KB
最終ジャッジ日時 2023-09-28 22:25:26
合計ジャッジ時間 4,563 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
71,604 KB
testcase_01 AC 86 ms
71,532 KB
testcase_02 AC 91 ms
71,716 KB
testcase_03 AC 89 ms
71,792 KB
testcase_04 AC 86 ms
71,588 KB
testcase_05 WA -
testcase_06 AC 88 ms
71,604 KB
testcase_07 AC 89 ms
71,796 KB
testcase_08 WA -
testcase_09 AC 104 ms
76,768 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 109 ms
77,492 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 93 ms
72,472 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 128 ms
78,028 KB
testcase_28 AC 154 ms
78,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

for _ in range(Q):
    t = int(input())
    if t==1:
        s = input()
        q.append(s)
        if len(q) > N:
            q.popleft()
    else:
        TD = [input().split() for i in range(6)]
        ans = 0
        rem = 60
        for s,d in TD:
            d = int(d)
            time = d
            if s in q:
                time = min(d,K)
            if rem >= time:
                rem -= time
                ans += 1
            else:
                break
        print(ans)
0