結果

問題 No.2372 既視感
ユーザー rlangevinrlangevin
提出日時 2023-07-07 21:30:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 584 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 76,892 KB
最終ジャッジ日時 2023-09-28 22:27:26
合計ジャッジ時間 3,580 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,352 KB
testcase_01 AC 69 ms
71,320 KB
testcase_02 AC 68 ms
71,240 KB
testcase_03 AC 70 ms
71,276 KB
testcase_04 AC 68 ms
71,308 KB
testcase_05 AC 69 ms
71,312 KB
testcase_06 AC 68 ms
71,256 KB
testcase_07 AC 68 ms
71,236 KB
testcase_08 WA -
testcase_09 AC 73 ms
71,320 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 75 ms
76,192 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 72 ms
71,524 KB
testcase_23 AC 78 ms
76,472 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 79 ms
76,684 KB
testcase_28 AC 86 ms
76,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N, K, Q = map(int, input().split())
S = set()
for _ in range(Q):
    flag = int(input())
    if flag == 1:
        S.add(input().rstrip())
    else:
        t, d = [0] * 6, [0] * 6
        for i in range(6):
            t[i], d[i] = input().split()
            
        ans = 0
        now = 0
        for i in range(6):
            if t[i] in S:
                now += min(int(d[i]), K)
            else:
                now += int(d[i])
            if now <= 60:
                ans += 1
            S.add(t[i])
            
        print(ans)
0