結果

問題 No.2372 既視感
ユーザー 👑 rin204rin204
提出日時 2023-07-07 21:26:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 478 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 78,696 KB
最終ジャッジ日時 2023-09-28 22:22:16
合計ジャッジ時間 4,281 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,436 KB
testcase_01 AC 73 ms
71,264 KB
testcase_02 AC 73 ms
71,136 KB
testcase_03 AC 75 ms
71,228 KB
testcase_04 AC 78 ms
71,364 KB
testcase_05 AC 74 ms
71,296 KB
testcase_06 AC 73 ms
71,400 KB
testcase_07 AC 73 ms
71,504 KB
testcase_08 AC 110 ms
78,204 KB
testcase_09 AC 89 ms
75,480 KB
testcase_10 AC 111 ms
78,368 KB
testcase_11 AC 116 ms
77,816 KB
testcase_12 AC 76 ms
71,192 KB
testcase_13 AC 117 ms
78,524 KB
testcase_14 AC 81 ms
71,232 KB
testcase_15 AC 98 ms
76,372 KB
testcase_16 AC 92 ms
75,188 KB
testcase_17 AC 81 ms
71,104 KB
testcase_18 AC 79 ms
71,300 KB
testcase_19 AC 77 ms
71,504 KB
testcase_20 AC 77 ms
71,424 KB
testcase_21 AC 77 ms
71,232 KB
testcase_22 AC 79 ms
71,328 KB
testcase_23 AC 123 ms
78,588 KB
testcase_24 AC 136 ms
78,616 KB
testcase_25 AC 122 ms
78,696 KB
testcase_26 AC 118 ms
78,464 KB
testcase_27 AC 121 ms
77,700 KB
testcase_28 AC 124 ms
77,624 KB
権限があれば一括ダウンロードができます

ソースコード

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
        TT = []
        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
                TT.append(t)

        print(x)
        lst += TT
0