結果

問題 No.2372 既視感
ユーザー RuteRute
提出日時 2023-07-07 21:36:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 714 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 10,932 KB
実行使用メモリ 8,752 KB
最終ジャッジ日時 2023-09-28 22:35:45
合計ジャッジ時間 2,186 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
8,632 KB
testcase_01 AC 23 ms
8,632 KB
testcase_02 AC 22 ms
8,468 KB
testcase_03 WA -
testcase_04 AC 20 ms
8,628 KB
testcase_05 WA -
testcase_06 AC 19 ms
8,548 KB
testcase_07 AC 20 ms
8,552 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 33 ms
8,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
N, K, Q = map(int,input().split())

q = deque([])
while Q:
    Q -= 1
    n = int(input())
    if n == 1:
        a = input()
        q.appendleft(a)
    else:
        P = []
        now = 0
        ans = 0
        for i in range(6):
            t, d = input().split()
            d = int(d)
            if t in q:
                if now + min(d, K) <= 60:
                    now += min(d, K)
                    ans += 1
            else:
                if now + d <= 60:
                    now += d
                    ans += 1
            P.append(t)
        print(ans)
        for i in range(6):
            q.appendleft(P[i])
            if len(q) > N:
                q.pop()
0