結果

問題 No.2372 既視感
ユーザー rlangevinrlangevin
提出日時 2023-07-07 21:34:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 738 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 78,236 KB
最終ジャッジ日時 2023-09-28 22:33:19
合計ジャッジ時間 4,688 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
71,736 KB
testcase_01 AC 97 ms
71,412 KB
testcase_02 AC 96 ms
71,868 KB
testcase_03 AC 96 ms
71,700 KB
testcase_04 AC 97 ms
71,784 KB
testcase_05 WA -
testcase_06 AC 96 ms
71,748 KB
testcase_07 AC 95 ms
71,456 KB
testcase_08 WA -
testcase_09 AC 106 ms
75,948 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 109 ms
77,052 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 103 ms
76,020 KB
testcase_23 AC 123 ms
78,108 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 122 ms
78,060 KB
testcase_28 AC 122 ms
78,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

N, K, Q = map(int, input().split())
S = deque()
for _ in range(Q):
    flag = int(input())
    if flag == 1:
        S.append(input().rstrip())
    else:
        t, d = [0] * 6, [0] * 6
        for i in range(6):
            t[i], d[i] = input().split()
            
        ans = 0
        now = 0
        for i in range(6):
            if t[i] in S:
                now += min(int(d[i]), K)
            else:
                now += int(d[i])
            if now <= 60:
                ans += 1
                
        for i in range(6):
            S.append(t[i])
            
        while len(S) > N:
            S.popleft()
            
            
        print(ans)
0