結果

問題 No.2372 既視感
ユーザー tamatotamato
提出日時 2023-07-07 21:29:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 657 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 77,792 KB
最終ジャッジ日時 2023-09-28 22:25:43
合計ジャッジ時間 4,675 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
71,480 KB
testcase_01 AC 99 ms
71,716 KB
testcase_02 AC 99 ms
71,580 KB
testcase_03 AC 98 ms
71,792 KB
testcase_04 AC 99 ms
71,676 KB
testcase_05 WA -
testcase_06 AC 98 ms
71,680 KB
testcase_07 AC 96 ms
71,784 KB
testcase_08 WA -
testcase_09 AC 104 ms
72,284 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 106 ms
77,452 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 100 ms
71,336 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 116 ms
77,284 KB
testcase_28 AC 117 ms
77,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import deque, defaultdict
input = sys.stdin.readline
mod = 998244353

N, K, Q = map(int, input().split())
que = deque()
D = defaultdict(int)
for _ in range(Q):
    flg = int(input())
    if flg == 1:
        S = input().rstrip('\n')
        que.append(S)
        D[S] += 1
        if len(que) > N:
            T = que.popleft()
            D[T] -= 1
    else:
        ans = 0
        t_sum = 0
        for _ in range(6):
            d, t = input().split()
            t = int(t)
            if D[d] > 0:
                t = min(t, K)
            t_sum += t
            if t_sum <= 60:
                ans += 1
        print(ans)
0