結果

問題 No.2372 既視感
ユーザー rin204
提出日時 2023-07-07 21:24:18
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 414 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 82,416 KB
実行使用メモリ 76,884 KB
最終ジャッジ日時 2024-07-21 17:04:55
合計ジャッジ時間 2,856 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k, Q = map(int, input().split())
lst = []
for _ in range(Q):
    t = int(input())
    if t == 1:
        S = input()
        lst.append(S)
    else:
        ans = 0
        x = 0
        for i in range(6):
            t, d = input().split()
            d = int(d)
            if t in lst[-n:]:
                d = min(d, k)
            ans += d
            if ans <= 60:
                x += 1
        print(x)
0