結果

問題 No.2372 既視感
ユーザー nouka28nouka28
提出日時 2023-07-07 21:31:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 616 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 78,432 KB
最終ジャッジ日時 2023-09-28 22:28:16
合計ジャッジ時間 4,573 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,320 KB
testcase_01 AC 73 ms
71,512 KB
testcase_02 AC 74 ms
71,312 KB
testcase_03 AC 73 ms
71,284 KB
testcase_04 AC 74 ms
71,196 KB
testcase_05 WA -
testcase_06 AC 74 ms
71,312 KB
testcase_07 AC 74 ms
71,396 KB
testcase_08 WA -
testcase_09 AC 92 ms
76,220 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 101 ms
76,512 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 86 ms
75,760 KB
testcase_23 AC 136 ms
78,016 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 130 ms
78,272 KB
testcase_28 AC 160 ms
78,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,q=map(int,input().split())
a=[]
for i in range(q):
    t=int(input())
    if t==1:
        s=input()
        a.append(s)
    if t==2:
        td=[input().split()for i in range(6)]
        for j in range(6):td[j][1]=int(td[j][1])
        recent=set()
        for i in range(n):
            try:recent.add(a[-i-1])
            except:break    
        ans=0
        res=6
        for j in range(6):
            if td[j][0]in recent:ans+=min(k,td[j][1])
            else:ans+=td[j][1]
            if ans>60:
                res=j
                break
        for j in range(6):a.append(td[j][0])
        print(res)
0