結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,508 KB
testcase_01 AC 19 ms
8,584 KB
testcase_02 AC 18 ms
8,464 KB
testcase_03 AC 20 ms
8,580 KB
testcase_04 AC 19 ms
8,612 KB
testcase_05 AC 19 ms
8,580 KB
testcase_06 AC 19 ms
8,444 KB
testcase_07 AC 19 ms
8,504 KB
testcase_08 AC 25 ms
8,484 KB
testcase_09 AC 23 ms
8,636 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 19 ms
8,460 KB
testcase_13 AC 26 ms
8,464 KB
testcase_14 AC 21 ms
8,684 KB
testcase_15 AC 24 ms
8,468 KB
testcase_16 AC 23 ms
8,552 KB
testcase_17 AC 20 ms
8,480 KB
testcase_18 AC 19 ms
8,632 KB
testcase_19 AC 19 ms
8,672 KB
testcase_20 AC 19 ms
8,452 KB
testcase_21 AC 19 ms
8,696 KB
testcase_22 AC 20 ms
8,508 KB
testcase_23 AC 34 ms
8,512 KB
testcase_24 AC 33 ms
8,696 KB
testcase_25 AC 34 ms
8,532 KB
testcase_26 WA -
testcase_27 AC 33 ms
8,500 KB
testcase_28 AC 31 ms
8,668 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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