結果

問題 No.2372 既視感
ユーザー aoymats1aoymats1
提出日時 2023-07-10 00:05:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 682 bytes
コンパイル時間 260 ms
コンパイル使用メモリ 86,940 KB
実行使用メモリ 78,532 KB
最終ジャッジ日時 2023-10-01 04:04:21
合計ジャッジ時間 5,256 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,344 KB
testcase_01 AC 69 ms
71,368 KB
testcase_02 AC 70 ms
71,176 KB
testcase_03 AC 69 ms
71,336 KB
testcase_04 AC 72 ms
71,156 KB
testcase_05 WA -
testcase_06 AC 67 ms
71,264 KB
testcase_07 AC 67 ms
71,352 KB
testcase_08 WA -
testcase_09 AC 84 ms
75,452 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 93 ms
76,104 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 77 ms
71,364 KB
testcase_23 AC 110 ms
77,896 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 112 ms
77,932 KB
testcase_28 AC 124 ms
77,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

A = []
for _ in range(Q):
    q = int(input())
    if q == 1:
        A.append(input())
    elif q == 2:
        M = len(A)
        B = A[max(0, M - N):]

        ans = 0
        time = 0
        done = []
        for i in range(6):
            t, d = input().split()
            d = int(d)

            if t in B:
                if time + min(d, K) <= 60:
                    ans += 1
                done.append(t)
                time += min(d, K)
            else:
                if time + d <= 60:
                    ans += 1
                done.append(t)
                time += d
            
        print(ans)
        A.extend(done)
0