結果

問題 No.2372 既視感
ユーザー koki-masutanikoki-masutani
提出日時 2024-03-19 21:05:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,388 bytes
コンパイル時間 452 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 57,632 KB
最終ジャッジ日時 2024-03-19 21:06:02
合計ジャッジ時間 2,629 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
53,460 KB
testcase_01 AC 38 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 37 ms
53,460 KB
testcase_04 AC 36 ms
53,460 KB
testcase_05 WA -
testcase_06 AC 40 ms
53,460 KB
testcase_07 AC 36 ms
53,460 KB
testcase_08 WA -
testcase_09 AC 39 ms
53,460 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 40 ms
55,584 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 38 ms
53,460 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 42 ms
55,584 KB
testcase_28 AC 47 ms
57,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

N, K, Q = map(int, input().split())
se = set()
query = sys.stdin.read().splitlines()
i = 0
lq = len(query)
while i < lq:
    line = query[i]
    if line == "1":
        i += 1
        se.add(query[i])
    elif line == "2":
        ans = 0
        time = 0
        t1, d1 = query[i + 1].split()
        d1 = int(d1)
        if t1 in se:
            d1 = min(d1, K)
        time += int(d1)
        if time <= 60:
            ans += 1
        t2, d2 = query[i + 2].split()
        d2 = int(d2)
        if t2 in se:
            d2 = min(d2, K)
        time += int(d2)
        if time <= 60:
            ans += 1
        t3, d3 = query[i + 3].split()
        d3 = int(d3)
        if t3 in se:
            d3 = min(d3, K)
        time += int(d3)
        if time <= 60:
            ans += 1
        t4, d4 = query[i + 4].split()
        d4 = int(d4)
        if t4 in se:
            d4 = min(d4, K)
        time += int(d4)
        if time <= 60:
            ans += 1
        t5, d5 = query[i + 5].split()
        d5 = int(d5)
        if t5 in se:
            d5 = min(d5, K)
        time += int(d5)
        if time <= 60:
            ans += 1
        t6, d6 = query[i + 6].split()
        d6 = int(d6)
        if t6 in se:
            d6 = min(d6, K)
        time += int(d6)
        if time <= 60:
            ans += 1
        print(ans)
        i += 6
        se = set()
    i += 1
0