結果

問題 No.2372 既視感
ユーザー 👑 hitonanodehitonanode
提出日時 2023-07-13 23:12:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 562 bytes
コンパイル時間 532 ms
コンパイル使用メモリ 10,928 KB
実行使用メモリ 8,344 KB
最終ジャッジ日時 2023-10-13 12:01:55
合計ジャッジ時間 2,651 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,780 KB
testcase_01 AC 15 ms
7,752 KB
testcase_02 AC 16 ms
7,860 KB
testcase_03 AC 16 ms
7,952 KB
testcase_04 AC 15 ms
7,752 KB
testcase_05 AC 16 ms
7,788 KB
testcase_06 AC 16 ms
7,864 KB
testcase_07 AC 15 ms
7,784 KB
testcase_08 AC 21 ms
7,956 KB
testcase_09 AC 18 ms
7,932 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 16 ms
7,860 KB
testcase_13 AC 22 ms
7,860 KB
testcase_14 AC 17 ms
7,864 KB
testcase_15 AC 20 ms
7,788 KB
testcase_16 AC 19 ms
7,784 KB
testcase_17 AC 17 ms
7,868 KB
testcase_18 AC 17 ms
7,756 KB
testcase_19 WA -
testcase_20 AC 17 ms
7,748 KB
testcase_21 AC 16 ms
7,700 KB
testcase_22 AC 17 ms
7,864 KB
testcase_23 AC 22 ms
8,172 KB
testcase_24 AC 21 ms
8,256 KB
testcase_25 AC 22 ms
8,328 KB
testcase_26 WA -
testcase_27 AC 21 ms
8,344 KB
testcase_28 AC 27 ms
7,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K, Q = map(int, input().split())

solved: set[str] = set()

for _ in range(Q):
    tp = int(input())
    if tp == 1:
        solved.add(input())
    else:
        info = [input().split() for _ in range(6)]
        sd = [(s, int(d)) for s, d in info]

        rem = 60
        ret = 0
        for s, d in sd:
            req = d
            if s in solved:
                req = min(req, K)
            if req <= rem:
                ret += 1
                rem -= req
                solved.add(s)
            else:
                break
        print(ret)

0